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

Unified Diff: content/browser/cache_storage/cache_storage_manager.cc

Issue 1174943004: [CacheStorage] Use URLRequestContextGetter instead of URLRequestContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from PS4 Created 5 years, 6 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
Index: content/browser/cache_storage/cache_storage_manager.cc
diff --git a/content/browser/cache_storage/cache_storage_manager.cc b/content/browser/cache_storage/cache_storage_manager.cc
index 9b56c07954c8ffa895a80ad8e9bd548208eb2767..cc13c443a3c41d4c9fbf143a13e6e68e1b676979 100644
--- a/content/browser/cache_storage/cache_storage_manager.cc
+++ b/content/browser/cache_storage/cache_storage_manager.cc
@@ -99,7 +99,7 @@ scoped_ptr<CacheStorageManager> CacheStorageManager::Create(
old_manager->quota_manager_proxy_.get()));
// These values may be NULL, in which case this will be called again later by
// the dispatcher host per usual.
- manager->SetBlobParametersForCache(old_manager->url_request_context(),
+ manager->SetBlobParametersForCache(old_manager->url_request_context_getter(),
old_manager->blob_storage_context());
return manager.Pass();
}
@@ -173,13 +173,14 @@ void CacheStorageManager::MatchAllCaches(
}
void CacheStorageManager::SetBlobParametersForCache(
- net::URLRequestContext* request_context,
+ const scoped_refptr<net::URLRequestContextGetter>& request_context_getter,
base::WeakPtr<storage::BlobStorageContext> blob_storage_context) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(cache_storage_map_.empty());
- DCHECK(!request_context_ || request_context_ == request_context);
+ DCHECK(!request_context_getter_ ||
+ request_context_getter_.get() == request_context_getter.get());
DCHECK(!blob_context_ || blob_context_.get() == blob_storage_context.get());
- request_context_ = request_context;
+ request_context_getter_ = request_context_getter;
blob_context_ = blob_storage_context;
}
@@ -292,7 +293,6 @@ CacheStorageManager::CacheStorageManager(
: root_path_(path),
cache_task_runner_(cache_task_runner),
quota_manager_proxy_(quota_manager_proxy),
- request_context_(NULL),
weak_ptr_factory_(this) {
if (quota_manager_proxy_.get()) {
quota_manager_proxy_->RegisterClient(
@@ -303,13 +303,13 @@ CacheStorageManager::CacheStorageManager(
CacheStorage* CacheStorageManager::FindOrCreateCacheStorage(
const GURL& origin) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
- DCHECK(request_context_);
+ DCHECK(request_context_getter_);
CacheStorageMap::const_iterator it = cache_storage_map_.find(origin);
if (it == cache_storage_map_.end()) {
MigrateOrigin(origin);
CacheStorage* cache_storage = new CacheStorage(
ConstructOriginPath(root_path_, origin), IsMemoryBacked(),
- cache_task_runner_.get(), request_context_, quota_manager_proxy_,
+ cache_task_runner_.get(), request_context_getter_, quota_manager_proxy_,
blob_context_, origin);
// The map owns fetch_stores.
cache_storage_map_.insert(std::make_pair(origin, cache_storage));
« no previous file with comments | « content/browser/cache_storage/cache_storage_manager.h ('k') | content/browser/cache_storage/cache_storage_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698