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

Side by Side Diff: webkit/quota/mock_storage_client.h

Issue 7003021: Added DeleteOriginData to QuotaClient (Closed)
Patch Set: '' Created 9 years, 7 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 unified diff | Download patch
« no previous file with comments | « webkit/fileapi/sandbox_quota_client_unittest.cc ('k') | webkit/quota/mock_storage_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_ 5 #ifndef WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_
6 #define WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_ 6 #define WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 21 matching lines...) Expand all
32 // QuotaClient methods. 32 // QuotaClient methods.
33 virtual QuotaClient::ID id() const OVERRIDE; 33 virtual QuotaClient::ID id() const OVERRIDE;
34 virtual void OnQuotaManagerDestroyed() OVERRIDE; 34 virtual void OnQuotaManagerDestroyed() OVERRIDE;
35 virtual void GetOriginUsage(const GURL& origin_url, 35 virtual void GetOriginUsage(const GURL& origin_url,
36 StorageType type, 36 StorageType type,
37 GetUsageCallback* callback) OVERRIDE; 37 GetUsageCallback* callback) OVERRIDE;
38 virtual void GetOriginsForType(StorageType type, 38 virtual void GetOriginsForType(StorageType type,
39 GetOriginsCallback* callback) OVERRIDE; 39 GetOriginsCallback* callback) OVERRIDE;
40 virtual void GetOriginsForHost(StorageType type, const std::string& host, 40 virtual void GetOriginsForHost(StorageType type, const std::string& host,
41 GetOriginsCallback* callback) OVERRIDE; 41 GetOriginsCallback* callback) OVERRIDE;
42 virtual void DeleteOriginData(const GURL& origin,
43 StorageType type,
44 DeletionCallback* callback) OVERRIDE;
42 45
43 private: 46 private:
44 void RunGetOriginUsage(const GURL& origin_url, 47 void RunGetOriginUsage(const GURL& origin_url,
45 StorageType type, 48 StorageType type,
46 GetUsageCallback* callback); 49 GetUsageCallback* callback);
47 void RunGetOriginsForType(StorageType type, 50 void RunGetOriginsForType(StorageType type,
48 GetOriginsCallback* callback); 51 GetOriginsCallback* callback);
49 void RunGetOriginsForHost(StorageType type, 52 void RunGetOriginsForHost(StorageType type,
50 const std::string& host, 53 const std::string& host,
51 GetOriginsCallback* callback); 54 GetOriginsCallback* callback);
55 void RunDeleteOriginData(const GURL& origin_url,
56 StorageType type,
57 DeletionCallback* callback);
52 58
53 scoped_refptr<QuotaManagerProxy> quota_manager_proxy_; 59 scoped_refptr<QuotaManagerProxy> quota_manager_proxy_;
54 const ID id_; 60 const ID id_;
55 61
56 typedef std::map<std::pair<GURL, StorageType>, int64> OriginDataMap; 62 typedef std::map<std::pair<GURL, StorageType>, int64> OriginDataMap;
57 OriginDataMap origin_data_; 63 OriginDataMap origin_data_;
58 64
59 std::set<GetUsageCallback*> usage_callbacks_; 65 std::set<GetUsageCallback*> usage_callbacks_;
60 std::set<GetOriginsCallback*> origins_callbacks_; 66 std::set<GetOriginsCallback*> origins_callbacks_;
67 std::set<DeletionCallback*> deletion_callbacks_;
61 68
62 ScopedRunnableMethodFactory<MockStorageClient> runnable_factory_; 69 ScopedRunnableMethodFactory<MockStorageClient> runnable_factory_;
63 70
64 DISALLOW_COPY_AND_ASSIGN(MockStorageClient); 71 DISALLOW_COPY_AND_ASSIGN(MockStorageClient);
65 }; 72 };
66 73
67 } // namespace quota 74 } // namespace quota
68 75
69 #endif // WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_ 76 #endif // WEBKIT_QUOTA_MOCK_STORAGE_CLIENT_H_
OLDNEW
« no previous file with comments | « webkit/fileapi/sandbox_quota_client_unittest.cc ('k') | webkit/quota/mock_storage_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698