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

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: style fixes. 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 25d4874d1083a1bbfd6df35da7670c905ddb7d4a..befc43814144735c6954f52a20d92628ca351c1c 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"
@@ -1299,11 +1300,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|?
Charlie Reis 2012/08/14 18:50:12 Do you think there will be any other places that w
awong 2012/08/14 19:12:47 I think it's mostly a SessionStorage thing. For r
+ content::StoragePartition* partition =
+ BrowserContext::GetStoragePartition(browser_context_, instance);
Charlie Reis 2012/08/14 18:50:12 nit: Wrong indent.
awong 2012/08/14 19:12:47 Done.
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;

Powered by Google App Engine
This is Rietveld 408576698