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

Side by Side Diff: webkit/database/database_quota_client.cc

Issue 7003021: Added DeleteOriginData to QuotaClient (Closed)
Patch Set: Rebased 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
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 #include <vector>
kinuko 2011/05/16 06:18:53 style-nit: This must be after "webkit/database/dat
tzik (google) 2011/05/16 07:47:01 Done.
6
5 #include "webkit/database/database_quota_client.h" 7 #include "webkit/database/database_quota_client.h"
6 8
7 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
8 #include "net/base/net_util.h" 10 #include "net/base/net_util.h"
9 #include "webkit/database/database_tracker.h" 11 #include "webkit/database/database_tracker.h"
10 #include "webkit/database/database_util.h" 12 #include "webkit/database/database_util.h"
11 13
12 using quota::QuotaClient; 14 using quota::QuotaClient;
13 15
14 namespace webkit_database { 16 namespace webkit_database {
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 return; 193 return;
192 } 194 }
193 195
194 if (origins_for_host_callbacks_.Add(host, callback.release())) { 196 if (origins_for_host_callbacks_.Add(host, callback.release())) {
195 scoped_refptr<GetOriginsForHostTask> task( 197 scoped_refptr<GetOriginsForHostTask> task(
196 new GetOriginsForHostTask(this, db_tracker_thread_, host)); 198 new GetOriginsForHostTask(this, db_tracker_thread_, host));
197 task->Start(); 199 task->Start();
198 } 200 }
199 } 201 }
200 202
203 void DatabaseQuotaClient::DeleteOriginData(const GURL& origin,
204 quota::StorageType type,
205 DeletionCallback* callback) {
206 // TODO(tzik): implement me
207 callback->Run(quota::kQuotaErrorNotSupported);
208 delete callback;
209 }
210
201 void DatabaseQuotaClient::DidGetOriginUsage( 211 void DatabaseQuotaClient::DidGetOriginUsage(
202 const GURL& origin_url, int64 usage) { 212 const GURL& origin_url, int64 usage) {
203 DCHECK(usage_for_origin_callbacks_.HasCallbacks(origin_url)); 213 DCHECK(usage_for_origin_callbacks_.HasCallbacks(origin_url));
204 usage_for_origin_callbacks_.Run(origin_url, usage); 214 usage_for_origin_callbacks_.Run(origin_url, usage);
205 } 215 }
206 216
207 void DatabaseQuotaClient::DidGetAllOrigins(const std::set<GURL>& origins) { 217 void DatabaseQuotaClient::DidGetAllOrigins(const std::set<GURL>& origins) {
208 DCHECK(origins_for_type_callbacks_.HasCallbacks()); 218 DCHECK(origins_for_type_callbacks_.HasCallbacks());
209 origins_for_type_callbacks_.Run(origins); 219 origins_for_type_callbacks_.Run(origins);
210 } 220 }
211 221
212 void DatabaseQuotaClient::DidGetOriginsForHost( 222 void DatabaseQuotaClient::DidGetOriginsForHost(
213 const std::string& host, const std::set<GURL>& origins) { 223 const std::string& host, const std::set<GURL>& origins) {
214 DCHECK(origins_for_host_callbacks_.HasCallbacks(host)); 224 DCHECK(origins_for_host_callbacks_.HasCallbacks(host));
215 origins_for_host_callbacks_.Run(host, origins); 225 origins_for_host_callbacks_.Run(host, origins);
216 } 226 }
217 227
218 } // namespace webkit_database 228 } // namespace webkit_database
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698