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

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

Issue 7533013: Quota: Add quota::StorageType to the GetOriginsCallback definition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing onto today's ToT. 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 | « webkit/quota/quota_types.h ('k') | no next file » | 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/usage_tracker.h" 5 #include "webkit/quota/usage_tracker.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 16 matching lines...) Expand all
27 tracker_(tracker), 27 tracker_(tracker),
28 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) { 28 callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
29 DCHECK(tracker_); 29 DCHECK(tracker_);
30 DCHECK(client_); 30 DCHECK(client_);
31 client_tracker_ = tracker_->GetClientTracker(client_->id()); 31 client_tracker_ = tracker_->GetClientTracker(client_->id());
32 DCHECK(client_tracker_); 32 DCHECK(client_tracker_);
33 } 33 }
34 virtual ~GatherUsageTaskBase() {} 34 virtual ~GatherUsageTaskBase() {}
35 35
36 // Get total usage for the given |origins|. 36 // Get total usage for the given |origins|.
37 void GetUsageForOrigins(const std::set<GURL>& origins) { 37 void GetUsageForOrigins(const std::set<GURL>& origins, StorageType type) {
38 DCHECK(original_message_loop()->BelongsToCurrentThread()); 38 DCHECK(original_message_loop()->BelongsToCurrentThread());
39 std::set<GURL> origins_to_process; 39 std::set<GURL> origins_to_process;
40 // We do not get usage for origins for which we have valid usage cache. 40 // We do not get usage for origins for which we have valid usage cache.
41 client_tracker()->DetermineOriginsToGetUsage(origins, &origins_to_process); 41 client_tracker()->DetermineOriginsToGetUsage(origins, &origins_to_process);
42 if (origins_to_process.empty()) { 42 if (origins_to_process.empty()) {
43 CallCompleted(); 43 CallCompleted();
44 DeleteSoon(); 44 DeleteSoon();
45 return; 45 return;
46 } 46 }
47 47
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 // Dispatches the host usage callback. 480 // Dispatches the host usage callback.
481 host_usage_callbacks_.Run(host, host, type_, host_usage_map_[host]); 481 host_usage_callbacks_.Run(host, host, type_, host_usage_map_[host]);
482 } 482 }
483 483
484 bool ClientUsageTracker::IsStorageUnlimited(const GURL& origin) const { 484 bool ClientUsageTracker::IsStorageUnlimited(const GURL& origin) const {
485 return special_storage_policy_.get() && 485 return special_storage_policy_.get() &&
486 special_storage_policy_->IsStorageUnlimited(origin); 486 special_storage_policy_->IsStorageUnlimited(origin);
487 } 487 }
488 488
489 } // namespace quota 489 } // namespace quota
OLDNEW
« no previous file with comments | « webkit/quota/quota_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698