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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_quota_helper_impl.cc

Issue 10916313: Cleanup: quota::HostUsageCallback and quota::HostQuotaCallback do not need to pass host and type as… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes for Kinuko Review #1 Created 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/quota_internals_proxy.cc » ('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) 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 "chrome/browser/browsing_data/browsing_data_quota_helper_impl.h" 5 #include "chrome/browser/browsing_data/browsing_data_quota_helper_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 pending_hosts_.erase(itr); 118 pending_hosts_.erase(itr);
119 GetHostUsage(host, type); 119 GetHostUsage(host, type);
120 } 120 }
121 121
122 void BrowsingDataQuotaHelperImpl::GetHostUsage(const std::string& host, 122 void BrowsingDataQuotaHelperImpl::GetHostUsage(const std::string& host,
123 quota::StorageType type) { 123 quota::StorageType type) {
124 DCHECK(quota_manager_.get()); 124 DCHECK(quota_manager_.get());
125 quota_manager_->GetHostUsage( 125 quota_manager_->GetHostUsage(
126 host, type, 126 host, type,
127 base::Bind(&BrowsingDataQuotaHelperImpl::GotHostUsage, 127 base::Bind(&BrowsingDataQuotaHelperImpl::GotHostUsage,
128 weak_factory_.GetWeakPtr())); 128 weak_factory_.GetWeakPtr(), host, type));
129 } 129 }
130 130
131 void BrowsingDataQuotaHelperImpl::GotHostUsage(const std::string& host, 131 void BrowsingDataQuotaHelperImpl::GotHostUsage(const std::string& host,
132 quota::StorageType type, 132 quota::StorageType type,
133 int64 usage) { 133 int64 usage) {
134 switch (type) { 134 switch (type) {
135 case quota::kStorageTypeTemporary: 135 case quota::kStorageTypeTemporary:
136 quota_info_[host].temporary_usage = usage; 136 quota_info_[host].temporary_usage = usage;
137 break; 137 break;
138 case quota::kStorageTypePersistent: 138 case quota::kStorageTypePersistent:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 callback_.Run(result); 172 callback_.Run(result);
173 callback_.Reset(); 173 callback_.Reset();
174 } 174 }
175 175
176 void BrowsingDataQuotaHelperImpl::DidRevokeHostQuota( 176 void BrowsingDataQuotaHelperImpl::DidRevokeHostQuota(
177 quota::QuotaStatusCode status_unused, 177 quota::QuotaStatusCode status_unused,
178 const std::string& host_unused, 178 const std::string& host_unused,
179 quota::StorageType type_unused, 179 quota::StorageType type_unused,
180 int64 quota_unused) { 180 int64 quota_unused) {
181 } 181 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/quota_internals_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698