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

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: Rebase to ToT. 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
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..3344e87faa854a6c19edb83a2fbc0ddcbe6b17a1 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()),
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,
kinuko 2012/02/09 14:43:33 style-nit: please break the line after '(' (or ali
+ 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