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

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

Issue 59753008: Quota: Add proxy for QuotaManager::GetUsageAndQuota (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ 5 #ifndef WEBKIT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_
6 #define WEBKIT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ 6 #define WEBKIT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 MockQuotaManagerProxy(MockQuotaManager* quota_manager, 144 MockQuotaManagerProxy(MockQuotaManager* quota_manager,
145 base::SingleThreadTaskRunner* task_runner); 145 base::SingleThreadTaskRunner* task_runner);
146 146
147 virtual void RegisterClient(QuotaClient* client) OVERRIDE; 147 virtual void RegisterClient(QuotaClient* client) OVERRIDE;
148 148
149 void SimulateQuotaManagerDestroyed(); 149 void SimulateQuotaManagerDestroyed();
150 150
151 // We don't mock them. 151 // We don't mock them.
152 virtual void NotifyOriginInUse(const GURL& origin) OVERRIDE {} 152 virtual void NotifyOriginInUse(const GURL& origin) OVERRIDE {}
153 virtual void NotifyOriginNoLongerInUse(const GURL& origin) OVERRIDE {} 153 virtual void NotifyOriginNoLongerInUse(const GURL& origin) OVERRIDE {}
154 virtual void SetUsageCacheEnabled(QuotaClient::ID client_id,
155 const GURL& origin,
156 StorageType type,
157 bool enabled) OVERRIDE {}
158 virtual void GetUsageAndQuota(
159 base::SingleThreadTaskRunner* original_task_runner,
160 const GURL& origin,
161 StorageType type,
162 const QuotaManager::GetUsageAndQuotaCallback& callback) OVERRIDE {}
154 163
155 // Validates the |client_id| and updates the internal access count 164 // Validates the |client_id| and updates the internal access count
165 // id SetUsageCacheEnabled()
nhiroki 2013/11/06 06:02:16 Will be removed.
156 // which can be accessed via notify_storage_accessed_count(). 166 // which can be accessed via notify_storage_accessed_count().
157 // The also records the |origin| and |type| in last_notified_origin_ and 167 // The also records the |origin| and |type| in last_notified_origin_ and
158 // last_notified_type_. 168 // last_notified_type_.
159 virtual void NotifyStorageAccessed(QuotaClient::ID client_id, 169 virtual void NotifyStorageAccessed(QuotaClient::ID client_id,
160 const GURL& origin, 170 const GURL& origin,
161 StorageType type) OVERRIDE; 171 StorageType type) OVERRIDE;
162 172
163 // Records the |origin|, |type| and |delta| as last_notified_origin_, 173 // Records the |origin|, |type| and |delta| as last_notified_origin_,
164 // last_notified_type_ and last_notified_delta_ respecitvely. 174 // last_notified_type_ and last_notified_delta_ respecitvely.
165 // If non-null MockQuotaManager is given to the constructor this also 175 // If non-null MockQuotaManager is given to the constructor this also
(...skipping 22 matching lines...) Expand all
188 GURL last_notified_origin_; 198 GURL last_notified_origin_;
189 StorageType last_notified_type_; 199 StorageType last_notified_type_;
190 int64 last_notified_delta_; 200 int64 last_notified_delta_;
191 201
192 QuotaClient* registered_client_; 202 QuotaClient* registered_client_;
193 }; 203 };
194 204
195 } // namespace quota 205 } // namespace quota
196 206
197 #endif // WEBKIT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_ 207 #endif // WEBKIT_BROWSER_QUOTA_MOCK_QUOTA_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698