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

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

Issue 10831116: Move SessionStorageNamespace entirely into NavigationController and support StoragePartitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged ToT 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: chrome/browser/sessions/session_service.cc
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index 71879f858774681551a4c7c96b2a8d40e5c4a0d3..a9c5364613508a435383424b14f29324f40cb849 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -605,8 +605,13 @@ void SessionService::Observe(int type,
// 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 =
- tab->web_contents()->GetController().GetSessionStorageNamespace();
+ tab->web_contents()->GetController().
+ GetDefaultSessionStorageNamespace();
ScheduleCommand(CreateSessionStorageAssociatedCommand(
tab->restore_tab_helper()->session_id(),
session_storage_namespace->persistent_id()));
@@ -621,7 +626,8 @@ void SessionService::Observe(int type,
// Allow the associated sessionStorage to get deleted; it won't be needed
// in the session restore.
content::SessionStorageNamespace* session_storage_namespace =
- tab->web_contents()->GetController().GetSessionStorageNamespace();
+ tab->web_contents()->GetController().
+ GetDefaultSessionStorageNamespace();
session_storage_namespace->SetShouldPersist(false);
TabClosed(tab->restore_tab_helper()->window_id(),
tab->restore_tab_helper()->session_id(),
@@ -1346,7 +1352,7 @@ void SessionService::BuildCommandsForTab(
// Record the association between the sessionStorage namespace and the tab.
content::SessionStorageNamespace* session_storage_namespace =
- tab->web_contents()->GetController().GetSessionStorageNamespace();
+ tab->web_contents()->GetController().GetDefaultSessionStorageNamespace();
ScheduleCommand(CreateSessionStorageAssociatedCommand(
tab->restore_tab_helper()->session_id(),
session_storage_namespace->persistent_id()));
« no previous file with comments | « chrome/browser/sessions/session_restore_browsertest.cc ('k') | chrome/browser/sessions/tab_restore_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698