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

Unified Diff: content/browser/web_contents/navigation_controller_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
Index: content/browser/web_contents/navigation_controller_impl.cc
diff --git a/content/browser/web_contents/navigation_controller_impl.cc b/content/browser/web_contents/navigation_controller_impl.cc
index 28ad4a481829ea79a4d13de709ee6f270516319c..877a446ad4d18e57e1a9edfdfac7755fcaccd317 100644
--- a/content/browser/web_contents/navigation_controller_impl.cc
+++ b/content/browser/web_contents/navigation_controller_impl.cc
@@ -27,6 +27,7 @@
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.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/common/content_client.h"
@@ -1269,11 +1270,15 @@ NavigationControllerImpl::GetSessionStorageNamespace(
return it->second.get();
// Create one if no one has accessed session storage for this partition yet.
+ //
+ // TODO(ajwong): Should this use the |partition_id| directly rather than
+ // re-lookup via |instance|? http://crbug.com/142685
+ content::StoragePartition* partition =
+ BrowserContext::GetStoragePartition(browser_context_, instance);
SessionStorageNamespaceImpl* session_storage_namespace =
new SessionStorageNamespaceImpl(
static_cast<DOMStorageContextImpl*>(
- BrowserContext::GetDOMStorageContextByPartitionId(
- browser_context_, partition_id)));
+ partition->GetDOMStorageContext()));
session_storage_namespace_map_[partition_id] = session_storage_namespace;
return session_storage_namespace;
« no previous file with comments | « content/browser/web_contents/interstitial_page_impl.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698