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

Side by Side Diff: webkit/quota/quota_manager.cc

Issue 7634013: Minor cleanup to UsageTracker.IsWorking(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 4 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
« no previous file with comments | « no previous file | webkit/quota/quota_types.h » ('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 #include "webkit/quota/quota_manager.h" 5 #include "webkit/quota/quota_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <set> 9 #include <set>
10 10
(...skipping 1165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 } 1176 }
1177 1177
1178 OriginDataDeleter* deleter = 1178 OriginDataDeleter* deleter =
1179 new OriginDataDeleter(this, origin, type, callback); 1179 new OriginDataDeleter(this, origin, type, callback);
1180 deleter->Start(); 1180 deleter->Start();
1181 } 1181 }
1182 1182
1183 bool QuotaManager::ResetUsageTracker(StorageType type) { 1183 bool QuotaManager::ResetUsageTracker(StorageType type) {
1184 switch (type) { 1184 switch (type) {
1185 case kStorageTypeTemporary: 1185 case kStorageTypeTemporary:
1186 if (!temporary_usage_tracker_->IsWorking()) 1186 if (temporary_usage_tracker_->IsWorking())
1187 return false; 1187 return false;
1188 temporary_usage_tracker_.reset( 1188 temporary_usage_tracker_.reset(
1189 new UsageTracker(clients_, kStorageTypeTemporary, 1189 new UsageTracker(clients_, kStorageTypeTemporary,
1190 special_storage_policy_)); 1190 special_storage_policy_));
1191 return true; 1191 return true;
1192 case kStorageTypePersistent: 1192 case kStorageTypePersistent:
1193 if (!persistent_usage_tracker_->IsWorking()) 1193 if (persistent_usage_tracker_->IsWorking())
1194 return false; 1194 return false;
1195 persistent_usage_tracker_.reset( 1195 persistent_usage_tracker_.reset(
1196 new UsageTracker(clients_, kStorageTypePersistent, 1196 new UsageTracker(clients_, kStorageTypePersistent,
1197 special_storage_policy_)); 1197 special_storage_policy_));
1198 return true; 1198 return true;
1199 default: 1199 default:
1200 NOTREACHED(); 1200 NOTREACHED();
1201 } 1201 }
1202 return true; 1202 return true;
1203 } 1203 }
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 1566
1567 QuotaManagerProxy::QuotaManagerProxy( 1567 QuotaManagerProxy::QuotaManagerProxy(
1568 QuotaManager* manager, base::MessageLoopProxy* io_thread) 1568 QuotaManager* manager, base::MessageLoopProxy* io_thread)
1569 : manager_(manager), io_thread_(io_thread) { 1569 : manager_(manager), io_thread_(io_thread) {
1570 } 1570 }
1571 1571
1572 QuotaManagerProxy::~QuotaManagerProxy() { 1572 QuotaManagerProxy::~QuotaManagerProxy() {
1573 } 1573 }
1574 1574
1575 } // namespace quota 1575 } // namespace quota
OLDNEW
« no previous file with comments | « no previous file | webkit/quota/quota_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698