summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browsing_data_appcache_helper.cc
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-15 14:34:50 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-15 14:34:50 +0000
commit92a4769c7cff24906ffa52fb3ee5e37753889a96 (patch)
treebb3ebe27a853bb3fdca8ab1e391298f89ba4d155 /chrome/browser/browsing_data_appcache_helper.cc
parent27861447e9b9f359cf893065ef07186589791333 (diff)
downloadchromium_src-92a4769c7cff24906ffa52fb3ee5e37753889a96.zip
chromium_src-92a4769c7cff24906ffa52fb3ee5e37753889a96.tar.gz
chromium_src-92a4769c7cff24906ffa52fb3ee5e37753889a96.tar.bz2
Remove more unnecessary ChromeURLRequestContext members.
ProfileIOData is now always deleted on the IO thread. Replaces a use of ChromeURLRequestContextGetter with a ChromeURLDataManagerBackend getter callback. Also gets rid of ExtensionInfoMap from ChromeURLRequestContext by directly passing it into the places that need it. Gets rid of the HTML5 storage objects from ChromeURLRequestContext too. Adds a workaround for TranslateManager's Profile::GetDefaultRequestContext() use, since after this refactoring (by not requiring ChromeURLRequestContextGetter for ChromeURLDataManagerBackend), it prevents having to initialize the ChromeURLRequestContextGetter in most tests since they don't actually use it. This means |default_request_context_| doesn't always get initialized in BrowserMain(), which causes TranslateManager to crash on startup since it requires |default_request_context_| to be initialized. So we forcibly initialize |default_request_context_| until TranslateManager stops depending on this. BUG=89396 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=92668 Review URL: http://codereview.chromium.org/7282054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92690 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browsing_data_appcache_helper.cc')
-rw-r--r--chrome/browser/browsing_data_appcache_helper.cc21
1 files changed, 6 insertions, 15 deletions
diff --git a/chrome/browser/browsing_data_appcache_helper.cc b/chrome/browser/browsing_data_appcache_helper.cc
index 6a7e8ee..512e666 100644
--- a/chrome/browser/browsing_data_appcache_helper.cc
+++ b/chrome/browser/browsing_data_appcache_helper.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -14,8 +14,8 @@
using appcache::AppCacheDatabase;
BrowsingDataAppCacheHelper::BrowsingDataAppCacheHelper(Profile* profile)
- : request_context_getter_(profile->GetRequestContext()),
- is_fetching_(false) {
+ : is_fetching_(false),
+ appcache_service_(profile->GetAppCacheService()) {
}
void BrowsingDataAppCacheHelper::StartFetching(Callback0::Type* callback) {
@@ -34,8 +34,8 @@ void BrowsingDataAppCacheHelper::StartFetching(Callback0::Type* callback) {
appcache_info_callback_ =
new net::CancelableCompletionCallback<BrowsingDataAppCacheHelper>(
this, &BrowsingDataAppCacheHelper::OnFetchComplete);
- GetAppCacheService()->GetAllAppCacheInfo(info_collection_,
- appcache_info_callback_);
+ appcache_service_->GetAllAppCacheInfo(info_collection_,
+ appcache_info_callback_);
}
void BrowsingDataAppCacheHelper::CancelNotification() {
@@ -58,7 +58,7 @@ void BrowsingDataAppCacheHelper::DeleteAppCacheGroup(
manifest_url));
return;
}
- GetAppCacheService()->DeleteAppCacheGroup(manifest_url, NULL);
+ appcache_service_->DeleteAppCacheGroup(manifest_url, NULL);
}
BrowsingDataAppCacheHelper::~BrowsingDataAppCacheHelper() {}
@@ -92,15 +92,6 @@ void BrowsingDataAppCacheHelper::OnFetchComplete(int rv) {
}
}
-ChromeAppCacheService* BrowsingDataAppCacheHelper::GetAppCacheService() {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- ChromeURLRequestContext* request_context =
- reinterpret_cast<ChromeURLRequestContext*>(
- request_context_getter_->GetURLRequestContext());
- return request_context ? request_context->appcache_service()
- : NULL;
-}
-
CannedBrowsingDataAppCacheHelper::CannedBrowsingDataAppCacheHelper(
Profile* profile)
: BrowsingDataAppCacheHelper(profile),