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

Unified Diff: webkit/quota/mock_storage_client.cc

Issue 7839029: QuotaManager::DeleteOriginData now allows deletion of specific QuotaClients (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: QuotaManager tests. Created 8 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
Index: webkit/quota/mock_storage_client.cc
diff --git a/webkit/quota/mock_storage_client.cc b/webkit/quota/mock_storage_client.cc
index 66ed587c11321d60bbf064591f6ac975489fde25..31855b16edac70fcad7b82776ce0ac9c3d99ffea 100644
--- a/webkit/quota/mock_storage_client.cc
+++ b/webkit/quota/mock_storage_client.cc
@@ -50,6 +50,21 @@ MockStorageClient::MockStorageClient(
id_(MockStorageClientIDSequencer::GetInstance()->NextMockID()),
kinuko 2012/01/22 18:35:31 I suspect this NextModkID() routine no longer work
Mike West 2012/01/22 20:54:38 Why not? Honestly, I'm not sure it was used in th
mock_time_counter_(0),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
+ Populate_(mock_data, mock_data_size);
+}
+
+MockStorageClient::MockStorageClient(
+ QuotaManagerProxy* quota_manager_proxy,
+ const MockOriginData* mock_data, QuotaClient::ID id, size_t mock_data_size)
+ : quota_manager_proxy_(quota_manager_proxy),
+ id_(id),
+ mock_time_counter_(0),
+ ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
+ Populate_(mock_data, mock_data_size);
+}
+
+void MockStorageClient::Populate_(const MockOriginData* mock_data,
+ size_t mock_data_size) {
for (size_t i = 0; i < mock_data_size; ++i) {
origin_data_[make_pair(GURL(mock_data[i].origin), mock_data[i].type)] =
mock_data[i].usage;

Powered by Google App Engine
This is Rietveld 408576698