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

Unified Diff: content/browser/resource_context_impl.cc

Issue 10916132: AppCache and StoragePartition'ing (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 | « content/browser/resource_context_impl.h ('k') | content/browser/storage_partition_impl_map.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/resource_context_impl.cc
===================================================================
--- content/browser/resource_context_impl.cc (revision 156155)
+++ content/browser/resource_context_impl.cc (working copy)
@@ -31,7 +31,6 @@
#include "webkit/fileapi/file_system_url_request_job_factory.h"
// Key names on ResourceContext.
-static const char* kAppCacheServiceKeyName = "content_appcache_service_tracker";
static const char* kBlobStorageContextKeyName = "content_blob_storage_context";
static const char* kHostZoomMapKeyName = "content_host_zoom_map";
@@ -185,11 +184,6 @@
} // namespace
-AppCacheService* ResourceContext::GetAppCacheService(ResourceContext* context) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- return UserDataAdapter<ChromeAppCacheService>::Get(
- context, kAppCacheServiceKeyName);
-}
ResourceContext::ResourceContext() {
if (ResourceDispatcherHostImpl::Get())
@@ -204,12 +198,6 @@
}
}
-BlobStorageController* GetBlobStorageControllerForResourceContext(
- ResourceContext* resource_context) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- return GetChromeBlobStorageContextForResourceContext(resource_context)->
- controller();
-}
ChromeBlobStorageContext* GetChromeBlobStorageContextForResourceContext(
ResourceContext* resource_context) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -228,11 +216,6 @@
DCHECK(!resource_context->GetUserData(kHostZoomMapKeyName));
resource_context->SetUserData(
- kAppCacheServiceKeyName,
- new UserDataAdapter<ChromeAppCacheService>(
- static_cast<ChromeAppCacheService*>(
- BrowserContext::GetAppCacheService(browser_context))));
- resource_context->SetUserData(
kBlobStorageContextKeyName,
new UserDataAdapter<ChromeBlobStorageContext>(
ChromeBlobStorageContext::GetFor(browser_context)));
@@ -245,6 +228,9 @@
HostZoomMap::GetForBrowserContext(browser_context)));
resource_context->DetachUserDataThread();
+ StoragePartition* storage_partition =
+ BrowserContext::GetDefaultStoragePartition(browser_context);
+
// Add content's URLRequestContext's hooks.
// Check first to avoid memory leak in unittests.
// TODO(creis): Do equivalent initializations for isolated app and isolated
@@ -264,9 +250,9 @@
base::Bind(
&InitializeRequestContext,
make_scoped_refptr(browser_context->GetRequestContext()),
- BrowserContext::GetAppCacheService(browser_context),
+ storage_partition->GetAppCacheService(),
make_scoped_refptr(
- BrowserContext::GetFileSystemContext(browser_context)),
+ storage_partition->GetFileSystemContext()),
make_scoped_refptr(
ChromeBlobStorageContext::GetFor(browser_context))));
BrowserThread::PostTask(
@@ -274,9 +260,9 @@
base::Bind(
&InitializeRequestContext,
make_scoped_refptr(browser_context->GetMediaRequestContext()),
- BrowserContext::GetAppCacheService(browser_context),
+ storage_partition->GetAppCacheService(),
make_scoped_refptr(
- BrowserContext::GetFileSystemContext(browser_context)),
+ storage_partition->GetFileSystemContext()),
make_scoped_refptr(
ChromeBlobStorageContext::GetFor(browser_context))));
}
« no previous file with comments | « content/browser/resource_context_impl.h ('k') | content/browser/storage_partition_impl_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698