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

Side by Side Diff: content/browser/quota/mock_quota_manager.h

Issue 1782053004: Change how the quota system computes the total poolsize for temporary storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_
6 #define CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ 6 #define CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 const scoped_refptr<base::SingleThreadTaskRunner>& io_thread, 49 const scoped_refptr<base::SingleThreadTaskRunner>& io_thread,
50 const scoped_refptr<base::SequencedTaskRunner>& db_thread, 50 const scoped_refptr<base::SequencedTaskRunner>& db_thread,
51 const scoped_refptr<SpecialStoragePolicy>& special_storage_policy); 51 const scoped_refptr<SpecialStoragePolicy>& special_storage_policy);
52 52
53 // Overrides QuotaManager's implementation. The internal usage data is 53 // Overrides QuotaManager's implementation. The internal usage data is
54 // updated when MockQuotaManagerProxy::NotifyStorageModified() is 54 // updated when MockQuotaManagerProxy::NotifyStorageModified() is
55 // called. The internal quota value can be updated by calling 55 // called. The internal quota value can be updated by calling
56 // a helper method MockQuotaManagerProxy::SetQuota(). 56 // a helper method MockQuotaManagerProxy::SetQuota().
57 void GetUsageAndQuota(const GURL& origin, 57 void GetUsageAndQuota(const GURL& origin,
58 storage::StorageType type, 58 storage::StorageType type,
59 const GetUsageAndQuotaCallback& callback) override; 59 const UsageAndQuotaCallback& callback) override;
60 60
61 // Overrides QuotaManager's implementation with a canned implementation that 61 // Overrides QuotaManager's implementation with a canned implementation that
62 // allows clients to set up the origin database that should be queried. This 62 // allows clients to set up the origin database that should be queried. This
63 // method will only search through the origins added explicitly via AddOrigin. 63 // method will only search through the origins added explicitly via AddOrigin.
64 void GetOriginsModifiedSince(StorageType type, 64 void GetOriginsModifiedSince(StorageType type,
65 base::Time modified_since, 65 base::Time modified_since,
66 const GetOriginsCallback& callback) override; 66 const GetOriginsCallback& callback) override;
67 67
68 // Removes an origin from the canned list of origins, but doesn't touch 68 // Removes an origin from the canned list of origins, but doesn't touch
69 // anything on disk. The caller must provide |quota_client_mask| which 69 // anything on disk. The caller must provide |quota_client_mask| which
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 std::vector<OriginInfo> origins_; 145 std::vector<OriginInfo> origins_;
146 UsageAndQuotaMap usage_and_quota_map_; 146 UsageAndQuotaMap usage_and_quota_map_;
147 base::WeakPtrFactory<MockQuotaManager> weak_factory_; 147 base::WeakPtrFactory<MockQuotaManager> weak_factory_;
148 148
149 DISALLOW_COPY_AND_ASSIGN(MockQuotaManager); 149 DISALLOW_COPY_AND_ASSIGN(MockQuotaManager);
150 }; 150 };
151 151
152 } // namespace content 152 } // namespace content
153 153
154 #endif // CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ 154 #endif // CONTENT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_browsertest.cc ('k') | content/browser/quota/mock_quota_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698