summaryrefslogtreecommitdiffstats
path: root/content/browser/resource_context_impl.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-24 23:38:12 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-24 23:38:12 +0000
commitc1fff0754fdf74d5b51f397c87ddb4a7f80f3462 (patch)
treebc797719e89e6b63bfd88c6f215630d7aa014cbf /content/browser/resource_context_impl.cc
parent9e3af36306f756a08b0386c0c340c51914febab4 (diff)
downloadchromium_src-c1fff0754fdf74d5b51f397c87ddb4a7f80f3462.zip
chromium_src-c1fff0754fdf74d5b51f397c87ddb4a7f80f3462.tar.gz
chromium_src-c1fff0754fdf74d5b51f397c87ddb4a7f80f3462.tar.bz2
Get rid of WebKitContext. Only two out of six HTML5 related objects were in it and it was just a glorified std::pair after the recent refactorings.
BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9467016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123588 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/resource_context_impl.cc')
-rw-r--r--content/browser/resource_context_impl.cc26
1 files changed, 16 insertions, 10 deletions
diff --git a/content/browser/resource_context_impl.cc b/content/browser/resource_context_impl.cc
index 8a2adfb3..2b99185 100644
--- a/content/browser/resource_context_impl.cc
+++ b/content/browser/resource_context_impl.cc
@@ -7,8 +7,8 @@
#include "content/browser/appcache/chrome_appcache_service.h"
#include "content/browser/chrome_blob_storage_context.h"
#include "content/browser/file_system/browser_file_system_helper.h"
-#include "content/browser/in_process_webkit/webkit_context.h"
#include "content/browser/host_zoom_map_impl.h"
+#include "content/browser/in_process_webkit/indexed_db_context_impl.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "webkit/database/database_tracker.h"
@@ -18,8 +18,8 @@ static const char* kAppCacheServicKeyName = "content_appcache_service_tracker";
static const char* kBlobStorageContextKeyName = "content_blob_storage_context";
static const char* kDatabaseTrackerKeyName = "content_database_tracker";
static const char* kFileSystemContextKeyName = "content_file_system_context";
+static const char* kIndexedDBContextKeyName = "content_indexed_db_context";
static const char* kHostZoomMapKeyName = "content_host_zoom_map";
-static const char* kWebKitContextKeyName = "content_webkit_context";
using appcache::AppCacheService;
using base::UserDataAdapter;
@@ -62,10 +62,10 @@ DatabaseTracker* GetDatabaseTrackerForResourceContext(
resource_context, kDatabaseTrackerKeyName);
}
-WebKitContext* GetWebKitContextForResourceContext(
+IndexedDBContextImpl* GetIndexedDBContextForResourceContext(
ResourceContext* resource_context) {
- return UserDataAdapter<WebKitContext>::Get(
- resource_context, kWebKitContextKeyName);
+ return UserDataAdapter<IndexedDBContextImpl>::Get(
+ resource_context, kIndexedDBContextKeyName);
}
ChromeBlobStorageContext* GetChromeBlobStorageContextForResourceContext(
@@ -81,14 +81,20 @@ HostZoomMap* GetHostZoomMapForResourceContext(ResourceContext* context) {
void EnsureResourceContextInitialized(BrowserContext* browser_context) {
ResourceContext* resource_context = browser_context->GetResourceContext();
-
- if (resource_context->GetUserData(kWebKitContextKeyName))
+ if (resource_context->GetUserData(kIndexedDBContextKeyName)) {
+ DCHECK(resource_context->GetUserData(kAppCacheServicKeyName));
+ DCHECK(resource_context->GetUserData(kBlobStorageContextKeyName));
+ DCHECK(resource_context->GetUserData(kDatabaseTrackerKeyName));
+ DCHECK(resource_context->GetUserData(kFileSystemContextKeyName));
+ DCHECK(resource_context->GetUserData(kHostZoomMapKeyName));
return;
+ }
resource_context->SetUserData(
- kWebKitContextKeyName,
- new UserDataAdapter<WebKitContext>(
- BrowserContext::GetWebKitContext(browser_context)));
+ kIndexedDBContextKeyName,
+ new UserDataAdapter<IndexedDBContextImpl>(
+ static_cast<IndexedDBContextImpl*>(
+ BrowserContext::GetIndexedDBContext(browser_context))));
resource_context->SetUserData(
kDatabaseTrackerKeyName,
new UserDataAdapter<webkit_database::DatabaseTracker>(