OLD | NEW |
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 12 matching lines...) Expand all Loading... |
23 // static | 23 // static |
24 BrowsingDataQuotaHelper* BrowsingDataQuotaHelper::Create(Profile* profile) { | 24 BrowsingDataQuotaHelper* BrowsingDataQuotaHelper::Create(Profile* profile) { |
25 return new BrowsingDataQuotaHelperImpl( | 25 return new BrowsingDataQuotaHelperImpl( |
26 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get(), | 26 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI).get(), |
27 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(), | 27 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO).get(), |
28 BrowserContext::GetDefaultStoragePartition(profile)->GetQuotaManager()); | 28 BrowserContext::GetDefaultStoragePartition(profile)->GetQuotaManager()); |
29 } | 29 } |
30 | 30 |
31 void BrowsingDataQuotaHelperImpl::StartFetching( | 31 void BrowsingDataQuotaHelperImpl::StartFetching( |
32 const FetchResultCallback& callback) { | 32 const FetchResultCallback& callback) { |
33 DCHECK_EQ(false, callback.is_null()); | 33 DCHECK(!callback.is_null()); |
34 DCHECK(callback_.is_null()); | 34 DCHECK(callback_.is_null()); |
35 DCHECK(!is_fetching_); | 35 DCHECK(!is_fetching_); |
36 callback_ = callback; | 36 callback_ = callback; |
37 quota_info_.clear(); | 37 quota_info_.clear(); |
38 is_fetching_ = true; | 38 is_fetching_ = true; |
39 | 39 |
40 FetchQuotaInfo(); | 40 FetchQuotaInfo(); |
41 } | 41 } |
42 | 42 |
43 void BrowsingDataQuotaHelperImpl::RevokeHostQuota(const std::string& host) { | 43 void BrowsingDataQuotaHelperImpl::RevokeHostQuota(const std::string& host) { |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 } | 183 } |
184 | 184 |
185 callback_.Run(result); | 185 callback_.Run(result); |
186 callback_.Reset(); | 186 callback_.Reset(); |
187 } | 187 } |
188 | 188 |
189 void BrowsingDataQuotaHelperImpl::DidRevokeHostQuota( | 189 void BrowsingDataQuotaHelperImpl::DidRevokeHostQuota( |
190 quota::QuotaStatusCode status_unused, | 190 quota::QuotaStatusCode status_unused, |
191 int64 quota_unused) { | 191 int64 quota_unused) { |
192 } | 192 } |
OLD | NEW |