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

Unified Diff: chrome/browser/browsing_data/mock_browsing_data_file_system_helper.cc

Issue 2092663002: Add a counter to calculate the total size of site data. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 4 years, 6 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
Index: chrome/browser/browsing_data/mock_browsing_data_file_system_helper.cc
diff --git a/chrome/browser/browsing_data/mock_browsing_data_file_system_helper.cc b/chrome/browser/browsing_data/mock_browsing_data_file_system_helper.cc
index eb9514ca52057f53c322ead66e01d08517af0dfd..14e9413bd84427783ed6199242a6923a9dc0a15b 100644
--- a/chrome/browser/browsing_data/mock_browsing_data_file_system_helper.cc
+++ b/chrome/browser/browsing_data/mock_browsing_data_file_system_helper.cc
@@ -34,22 +34,23 @@ void MockBrowsingDataFileSystemHelper::DeleteFileSystemOrigin(
void MockBrowsingDataFileSystemHelper::AddFileSystem(
const GURL& origin, bool has_persistent, bool has_temporary,
- bool has_syncable) {
+ bool has_syncable, int64_t size_persistent, int64_t size_temporary,
+ int64_t size_syncable) {
BrowsingDataFileSystemHelper::FileSystemInfo info(origin);
if (has_persistent)
- info.usage_map[storage::kFileSystemTypePersistent] = 0;
+ info.usage_map[storage::kFileSystemTypePersistent] = size_persistent;
if (has_temporary)
- info.usage_map[storage::kFileSystemTypeTemporary] = 0;
+ info.usage_map[storage::kFileSystemTypeTemporary] = size_temporary;
if (has_syncable)
- info.usage_map[storage::kFileSystemTypeSyncable] = 0;
+ info.usage_map[storage::kFileSystemTypeSyncable] = size_syncable;
response_.push_back(info);
file_systems_[origin.spec()] = true;
}
void MockBrowsingDataFileSystemHelper::AddFileSystemSamples() {
- AddFileSystem(GURL("http://fshost1:1/"), false, true, false);
- AddFileSystem(GURL("http://fshost2:2/"), true, false, true);
- AddFileSystem(GURL("http://fshost3:3/"), true, true, true);
+ AddFileSystem(GURL("http://fshost1:1/"), false, true, false, 0, 1, 0);
+ AddFileSystem(GURL("http://fshost2:2/"), true, false, true, 2, 0, 2);
+ AddFileSystem(GURL("http://fshost3:3/"), true, true, true, 3, 3, 3);
}
void MockBrowsingDataFileSystemHelper::Notify() {

Powered by Google App Engine
This is Rietveld 408576698