summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browsing_data_quota_helper_impl.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-10 06:17:13 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-10 06:17:13 +0000
commit91b06c06d2aec6a38a408d97a7991ea4a233d0f6 (patch)
tree1a2c42647eb55cd59995faecb0397e134a04c428 /chrome/browser/browsing_data_quota_helper_impl.cc
parent3e2dd4fa0baff84af0a1c821328b4b17d128717e (diff)
downloadchromium_src-91b06c06d2aec6a38a408d97a7991ea4a233d0f6.zip
chromium_src-91b06c06d2aec6a38a408d97a7991ea4a233d0f6.tar.gz
chromium_src-91b06c06d2aec6a38a408d97a7991ea4a233d0f6.tar.bz2
base::Bind: Convert BrowsingDataQuotaHelper::StartFetching.
BUG=none TEST=none R=csilv@chromium.org Review URL: http://codereview.chromium.org/8401027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109382 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data_quota_helper_impl.cc')
-rw-r--r--chrome/browser/browsing_data_quota_helper_impl.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/browsing_data_quota_helper_impl.cc b/chrome/browser/browsing_data_quota_helper_impl.cc
index 4777e66..b198068 100644
--- a/chrome/browser/browsing_data_quota_helper_impl.cc
+++ b/chrome/browser/browsing_data_quota_helper_impl.cc
@@ -22,11 +22,12 @@ BrowsingDataQuotaHelper* BrowsingDataQuotaHelper::Create(Profile* profile) {
profile->GetQuotaManager());
}
-void BrowsingDataQuotaHelperImpl::StartFetching(FetchResultCallback* callback) {
- DCHECK(callback);
- DCHECK(!callback_.get());
+void BrowsingDataQuotaHelperImpl::StartFetching(
+ const FetchResultCallback& callback) {
+ DCHECK_EQ(false, callback.is_null());
+ DCHECK(callback_.is_null());
DCHECK(!is_fetching_);
- callback_.reset(callback);
+ callback_ = callback;
quota_info_.clear();
is_fetching_ = true;
@@ -34,7 +35,7 @@ void BrowsingDataQuotaHelperImpl::StartFetching(FetchResultCallback* callback) {
}
void BrowsingDataQuotaHelperImpl::CancelNotification() {
- callback_.reset();
+ callback_.Reset();
}
void BrowsingDataQuotaHelperImpl::RevokeHostQuota(const std::string& host) {
@@ -143,7 +144,7 @@ void BrowsingDataQuotaHelperImpl::GotHostUsage(const std::string& host,
void BrowsingDataQuotaHelperImpl::OnComplete() {
// Check if CancelNotification was called
- if (!callback_.get())
+ if (callback_.is_null())
return;
if (!ui_thread_->BelongsToCurrentThread()) {
@@ -170,8 +171,8 @@ void BrowsingDataQuotaHelperImpl::OnComplete() {
result.push_back(*info);
}
- callback_->Run(result);
- callback_.reset();
+ callback_.Run(result);
+ callback_.Reset();
}
void BrowsingDataQuotaHelperImpl::DidRevokeHostQuota(