diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-18 08:54:34 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-18 08:54:34 +0000 |
commit | 4c3a235850730f45ee734eef73e79fe386826950 (patch) | |
tree | 953f9688e8bd31fd156178ef3715433cabf8fc61 /content/browser/web_contents/web_contents_impl.cc | |
parent | 9b4ba94c9d95328e811771e74b8a8bb8580731d8 (diff) | |
download | chromium_src-4c3a235850730f45ee734eef73e79fe386826950.zip chromium_src-4c3a235850730f45ee734eef73e79fe386826950.tar.gz chromium_src-4c3a235850730f45ee734eef73e79fe386826950.tar.bz2 |
Move StoragePartition into content/public and remove BrowserContext::GetDOMStorageContext().
Eventually all the storage context accessors will be removed from BrowserContext. Instead, users should retrieve the storage context from the StoragePartition.
This also changes RenderProcessHost to take in a StoragePartition removing the need for a re-lookup its storage contexts.
BUG=85121,143486
Review URL: https://chromiumcodereview.appspot.com/10837230
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152251 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/web_contents/web_contents_impl.cc')
-rw-r--r-- | content/browser/web_contents/web_contents_impl.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index d4c3dafb..61d98d8 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -54,6 +54,7 @@ #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/resource_request_details.h" +#include "content/public/browser/storage_partition.h" #include "content/public/browser/user_metrics.h" #include "content/public/browser/web_contents_delegate.h" #include "content/public/browser/web_contents_observer.h" @@ -1247,14 +1248,17 @@ void WebContentsImpl::CreateNewWindow( params.opener_suppressed ? NULL : this); // We must assign the SessionStorageNamespace before calling Init(). + // + // http://crbug.com/142685 const std::string& partition_id = content::GetContentClient()->browser()-> GetStoragePartitionIdForSiteInstance(GetBrowserContext(), site_instance); + content::StoragePartition* partition = + BrowserContext::GetStoragePartition(GetBrowserContext(), + site_instance); DOMStorageContextImpl* dom_storage_context = - static_cast<DOMStorageContextImpl*>( - BrowserContext::GetDOMStorageContextByPartitionId( - GetBrowserContext(), partition_id)); + static_cast<DOMStorageContextImpl*>(partition->GetDOMStorageContext()); SessionStorageNamespaceImpl* session_storage_namespace_impl = static_cast<SessionStorageNamespaceImpl*>(session_storage_namespace); CHECK(session_storage_namespace_impl->IsFromContext(dom_storage_context)); |