Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6538)

Unified Diff: chrome/browser/ui/webui/settings/chromeos/device_storage_handler.cc

Issue 2556363003: Refactor cache counting into a separate helper class (Closed)
Patch Set: Remove code depending on GetEntrySize() Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/storage_manager_handler.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/settings/chromeos/device_storage_handler.cc
diff --git a/chrome/browser/ui/webui/settings/chromeos/device_storage_handler.cc b/chrome/browser/ui/webui/settings/chromeos/device_storage_handler.cc
index 858fab411039767bd1a1bb7e0f9fa1048780573a..b1d991a30e983c11a87cfb91860e61f3d833985c 100644
--- a/chrome/browser/ui/webui/settings/chromeos/device_storage_handler.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/device_storage_handler.cc
@@ -28,7 +28,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/grit/generated_resources.h"
#include "chromeos/cryptohome/homedir_methods.h"
-#include "components/browsing_data/content/storage_partition_http_cache_data_remover.h"
+#include "components/browsing_data/content/conditional_cache_counting_helper.h"
#include "components/drive/chromeos/file_system_interface.h"
#include "components/user_manager/user_manager.h"
#include "content/public/browser/browser_context.h"
@@ -232,11 +232,11 @@ void StorageHandler::UpdateBrowsingDataSize() {
has_browser_site_data_size_ = false;
Profile* const profile = Profile::FromWebUI(web_ui());
// Fetch the size of http cache in browsing data.
- // StoragePartitionHttpCacheDataRemover deletes itself when it is done.
- browsing_data::StoragePartitionHttpCacheDataRemover::CreateForRange(
+ // ConditionalCacheCountingHelper deletes itself when it is done.
+ browsing_data::ConditionalCacheCountingHelper::CreateForRange(
content::BrowserContext::GetDefaultStoragePartition(profile),
- base::Time(),
- base::Time::Max())->Count(
+ base::Time(), base::Time::Max())
+ ->CountAndDestroySelfWhenFinished(
base::Bind(&StorageHandler::OnGetBrowsingDataSize,
base::Unretained(this), false));
« no previous file with comments | « chrome/browser/ui/webui/options/chromeos/storage_manager_handler.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698