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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 10837230: Move StoragePartition into content/public and remove BrowserContext::GetDOMStorageContext(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove DISALLOW_COPY_AND_ASSIGN, and change RPH::CreateMessageFilters() to not suddenly isolate all… Created 8 years, 4 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/web_contents/navigation_controller_impl.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index cee3043ec6c0f9d39b64d34c1fbab5f98f3d9b5f..2f34190a87bd77c4981a583b78cebedc71c2e412 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"
@@ -1244,14 +1245,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));
« no previous file with comments | « content/browser/web_contents/navigation_controller_impl.cc ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698