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

Unified Diff: chrome/browser/browsing_data_appcache_helper.cc

Issue 7384008: Revert 92668 - Remove more unnecessary ChromeURLRequestContext members. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browsing_data_appcache_helper.h ('k') | chrome/browser/download/download_file_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data_appcache_helper.cc
===================================================================
--- chrome/browser/browsing_data_appcache_helper.cc (revision 92669)
+++ chrome/browser/browsing_data_appcache_helper.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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)
- : is_fetching_(false),
- appcache_service_(profile->GetAppCacheService()) {
+ : request_context_getter_(profile->GetRequestContext()),
+ is_fetching_(false) {
}
void BrowsingDataAppCacheHelper::StartFetching(Callback0::Type* callback) {
@@ -34,8 +34,8 @@
appcache_info_callback_ =
new net::CancelableCompletionCallback<BrowsingDataAppCacheHelper>(
this, &BrowsingDataAppCacheHelper::OnFetchComplete);
- appcache_service_->GetAllAppCacheInfo(info_collection_,
- appcache_info_callback_);
+ GetAppCacheService()->GetAllAppCacheInfo(info_collection_,
+ appcache_info_callback_);
}
void BrowsingDataAppCacheHelper::CancelNotification() {
@@ -58,7 +58,7 @@
manifest_url));
return;
}
- appcache_service_->DeleteAppCacheGroup(manifest_url, NULL);
+ GetAppCacheService()->DeleteAppCacheGroup(manifest_url, NULL);
}
BrowsingDataAppCacheHelper::~BrowsingDataAppCacheHelper() {}
@@ -92,6 +92,15 @@
}
}
+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),
« no previous file with comments | « chrome/browser/browsing_data_appcache_helper.h ('k') | chrome/browser/download/download_file_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698