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

Unified Diff: chrome/browser/sessions/session_service.cc

Issue 18500005: Fix SessionStorage confusion between RenderViewHostImpl and NavigationController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: code review Created 7 years, 5 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: chrome/browser/sessions/session_service.cc
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index 15215527924fa35d79b0e3b68c39ec9a6f65351c..e399d051578c08f44d64512d62fcb09ef34bbec1 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -1334,7 +1334,7 @@ void SessionService::BuildCommandsForTab(const SessionID& window_id,
// Record the association between the sessionStorage namespace and the tab.
content::SessionStorageNamespace* session_storage_namespace =
- tab->GetController().GetDefaultSessionStorageNamespace();
+ tab->GetController().GetSessionStorageNamespace();
ScheduleCommand(CreateSessionStorageAssociatedCommand(
session_tab_helper->session_id(),
session_storage_namespace->persistent_id()));
@@ -1736,12 +1736,8 @@ void SessionService::TabInserted(WebContents* contents) {
// Record the association between the SessionStorageNamespace and the
// tab.
- //
- // TODO(ajwong): This should be processing the whole map rather than
- // just the default. This in particular will not work for tabs with only
- // isolated apps which won't have a default partition.
content::SessionStorageNamespace* session_storage_namespace =
- contents->GetController().GetDefaultSessionStorageNamespace();
+ contents->GetController().GetSessionStorageNamespace();
ScheduleCommand(CreateSessionStorageAssociatedCommand(
session_tab_helper->session_id(),
session_storage_namespace->persistent_id()));
@@ -1752,7 +1748,7 @@ void SessionService::TabClosing(WebContents* contents) {
// Allow the associated sessionStorage to get deleted; it won't be needed
// in the session restore.
content::SessionStorageNamespace* session_storage_namespace =
- contents->GetController().GetDefaultSessionStorageNamespace();
+ contents->GetController().GetSessionStorageNamespace();
session_storage_namespace->SetShouldPersist(false);
SessionTabHelper* session_tab_helper =
SessionTabHelper::FromWebContents(contents);

Powered by Google App Engine
This is Rietveld 408576698