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

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: Kinuko's feedback (modulo kMockStart) Created 8 years, 10 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 | « webkit/quota/mock_storage_client.h ('k') | webkit/quota/quota_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1db4f2c024622d812bcd65af59bd627ec2521c8b 100644
--- a/webkit/quota/mock_storage_client.cc
+++ b/webkit/quota/mock_storage_client.cc
@@ -50,6 +50,22 @@ MockStorageClient::MockStorageClient(
id_(MockStorageClientIDSequencer::GetInstance()->NextMockID()),
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;
« no previous file with comments | « webkit/quota/mock_storage_client.h ('k') | webkit/quota/quota_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698