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

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

Issue 9419033: Move creation of BrowserContext objects that live in content to content, instead of depending on th… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fix memory leaks in tests Created 8 years, 10 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
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 "chrome/browser/browsing_data_quota_helper_impl.h" 5 #include "chrome/browser/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"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "webkit/quota/quota_manager.h" 13 #include "webkit/quota/quota_manager.h"
14 14
15 using content::BrowserThread; 15 using content::BrowserThread;
16 16
17 // static 17 // static
18 BrowsingDataQuotaHelper* BrowsingDataQuotaHelper::Create(Profile* profile) { 18 BrowsingDataQuotaHelper* BrowsingDataQuotaHelper::Create(Profile* profile) {
19 return new BrowsingDataQuotaHelperImpl( 19 return new BrowsingDataQuotaHelperImpl(
20 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI), 20 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI),
21 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), 21 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
22 profile->GetQuotaManager()); 22 content::BrowserContext::GetQuotaManager(profile));
23 } 23 }
24 24
25 void BrowsingDataQuotaHelperImpl::StartFetching( 25 void BrowsingDataQuotaHelperImpl::StartFetching(
26 const FetchResultCallback& callback) { 26 const FetchResultCallback& callback) {
27 DCHECK_EQ(false, callback.is_null()); 27 DCHECK_EQ(false, callback.is_null());
28 DCHECK(callback_.is_null()); 28 DCHECK(callback_.is_null());
29 DCHECK(!is_fetching_); 29 DCHECK(!is_fetching_);
30 callback_ = callback; 30 callback_ = callback;
31 quota_info_.clear(); 31 quota_info_.clear();
32 is_fetching_ = true; 32 is_fetching_ = true;
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 callback_.Run(result); 174 callback_.Run(result);
175 callback_.Reset(); 175 callback_.Reset();
176 } 176 }
177 177
178 void BrowsingDataQuotaHelperImpl::DidRevokeHostQuota( 178 void BrowsingDataQuotaHelperImpl::DidRevokeHostQuota(
179 quota::QuotaStatusCode status_unused, 179 quota::QuotaStatusCode status_unused,
180 const std::string& host_unused, 180 const std::string& host_unused,
181 quota::StorageType type_unused, 181 quota::StorageType type_unused,
182 int64 quota_unused) { 182 int64 quota_unused) {
183 } 183 }
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data_local_storage_helper.cc ('k') | chrome/browser/browsing_data_remover.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698