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

Unified Diff: webkit/quota/mock_quota_manager.h

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 | « chrome/browser/browsing_data_remover_unittest.cc ('k') | webkit/quota/mock_quota_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/quota/mock_quota_manager.h
diff --git a/webkit/quota/mock_quota_manager.h b/webkit/quota/mock_quota_manager.h
index 1f6fb0b1e3ae15c3adaaac28a1a9cba1d9ebefce..317c476fa8009773a2fcdfa3b2ceace4c52cd3e4 100644
--- a/webkit/quota/mock_quota_manager.h
+++ b/webkit/quota/mock_quota_manager.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -31,11 +31,13 @@ class MockQuotaManager : public QuotaManager {
struct OriginInfo {
OriginInfo(const GURL& origin,
StorageType type,
+ int quota_client_mask,
base::Time modified);
~OriginInfo();
GURL origin;
StorageType type;
+ int quota_client_mask;
base::Time modified;
};
@@ -48,13 +50,20 @@ class MockQuotaManager : public QuotaManager {
virtual ~MockQuotaManager();
// Adds an origin to the canned list that will be searched through via
- // GetOriginsModifiedSince.
- bool AddOrigin(const GURL& origin, StorageType type, base::Time modified);
+ // GetOriginsModifiedSince. The caller must provide |quota_client_mask|
+ // which specifies the types of QuotaClients this canned origin contains
+ // as a bitmask built from QuotaClient::IDs.
+ bool AddOrigin(const GURL& origin,
+ StorageType type,
+ int quota_client_mask,
+ base::Time modified);
// Checks an origin and type against the origins that have been added via
// AddOrigin and removed via DeleteOriginData. If the origin exists in the
- // canned list with the proper StorageType, returns true.
- bool OriginHasData(const GURL& origin, StorageType type) const;
+ // canned list with the proper StorageType and client, returns true.
+ bool OriginHasData(const GURL& origin,
+ StorageType type,
+ QuotaClient::ID quota_client) const;
// Overrides QuotaManager's implementation with a canned implementation that
// allows clients to set up the origin database that should be queried. This
@@ -65,9 +74,14 @@ class MockQuotaManager : public QuotaManager {
const GetOriginsCallback& callback) OVERRIDE;
// Removes an origin from the canned list of origins, but doesn't touch
- // anything on disk.
+ // anything on disk. The caller must provide |quota_client_mask| which
+ // specifies the types of QuotaClients which should be removed from this
+ // origin as a bitmask built from QuotaClient::IDs. Setting the mask to
+ // QuotaClient::kAllClientsMask will remove all clients from the origin,
+ // regardless of type.
virtual void DeleteOriginData(const GURL& origin,
StorageType type,
+ int quota_client_mask,
const StatusCallback& callback) OVERRIDE;
private:
« no previous file with comments | « chrome/browser/browsing_data_remover_unittest.cc ('k') | webkit/quota/mock_quota_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698