#include "chrome/browser/browsing_data/site_data_size_collector.h"
#include <utility>
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/task/thread_pool.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/pref_names.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/storage_usage_info.h"
#include "content/public/common/content_constants.h"
namespace {
int64_t GetFileSizeBlocking(const base::FilePath& file_path) { … }
}
SiteDataSizeCollector::SiteDataSizeCollector(
const base::FilePath& default_storage_partition_path,
scoped_refptr<browsing_data::CookieHelper> cookie_helper,
scoped_refptr<browsing_data::LocalStorageHelper> local_storage_helper,
scoped_refptr<BrowsingDataQuotaHelper> quota_helper)
: … { … }
SiteDataSizeCollector::~SiteDataSizeCollector() { … }
void SiteDataSizeCollector::Fetch(FetchCallback callback) { … }
void SiteDataSizeCollector::OnCookiesModelInfoLoaded(
const net::CookieList& cookie_list) { … }
void SiteDataSizeCollector::OnLocalStorageModelInfoLoaded(
const LocalStorageInfoList& local_storage_info_list) { … }
void SiteDataSizeCollector::OnQuotaModelInfoLoaded(
const QuotaStorageUsageInfoList& quota_storage_info_list) { … }
void SiteDataSizeCollector::OnStorageSizeFetched(int64_t size) { … }