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

Side by Side Diff: webkit/browser/appcache/appcache_quota_client.cc

Issue 23545016: Not creating ClientUsageTracker for unsupported storage type. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/browser/appcache/appcache_quota_client.h" 5 #include "webkit/browser/appcache/appcache_quota_client.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 current_delete_request_callback_ = callback; 132 current_delete_request_callback_ = callback;
133 if (type != quota::kStorageTypeTemporary) { 133 if (type != quota::kStorageTypeTemporary) {
134 DidDeleteAppCachesForOrigin(net::OK); 134 DidDeleteAppCachesForOrigin(net::OK);
135 return; 135 return;
136 } 136 }
137 137
138 service_->DeleteAppCachesForOrigin( 138 service_->DeleteAppCachesForOrigin(
139 origin, GetServiceDeleteCallback()->callback()); 139 origin, GetServiceDeleteCallback()->callback());
140 } 140 }
141 141
142 bool AppCacheQuotaClient::DoesSupport(quota::StorageType type) const {
143 return type == quota::kStorageTypeTemporary;
144 }
145
142 void AppCacheQuotaClient::DidDeleteAppCachesForOrigin(int rv) { 146 void AppCacheQuotaClient::DidDeleteAppCachesForOrigin(int rv) {
143 DCHECK(service_); 147 DCHECK(service_);
144 if (quota_manager_is_destroyed_) 148 if (quota_manager_is_destroyed_)
145 return; 149 return;
146 150
147 // Finish the request by calling our callers callback. 151 // Finish the request by calling our callers callback.
148 current_delete_request_callback_.Run(NetErrorCodeToQuotaStatus(rv)); 152 current_delete_request_callback_.Run(NetErrorCodeToQuotaStatus(rv));
149 current_delete_request_callback_.Reset(); 153 current_delete_request_callback_.Reset();
150 if (pending_serial_requests_.empty()) 154 if (pending_serial_requests_.empty())
151 return; 155 return;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 current_delete_request_callback_.Run(quota::kQuotaErrorAbort); 241 current_delete_request_callback_.Run(quota::kQuotaErrorAbort);
238 current_delete_request_callback_.Reset(); 242 current_delete_request_callback_.Reset();
239 GetServiceDeleteCallback()->Cancel(); 243 GetServiceDeleteCallback()->Cancel();
240 } 244 }
241 245
242 if (quota_manager_is_destroyed_) 246 if (quota_manager_is_destroyed_)
243 delete this; 247 delete this;
244 } 248 }
245 249
246 } // namespace appcache 250 } // namespace appcache
OLDNEW
« no previous file with comments | « webkit/browser/appcache/appcache_quota_client.h ('k') | webkit/browser/database/database_quota_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698