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

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: mac win compile 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: chrome/browser/sessions/session_service.cc
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index 71879f858774681551a4c7c96b2a8d40e5c4a0d3..caf5475a627844324d056f94c845f3d3cb57e56a 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -606,7 +606,8 @@ void SessionService::Observe(int type,
// Record the association between the SessionStorageNamespace and the
// tab.
content::SessionStorageNamespace* session_storage_namespace =
- tab->web_contents()->GetController().GetSessionStorageNamespace();
+ tab->web_contents()->GetController().GetSessionStorageNamespaceMap()
+ .find("")->second;
ScheduleCommand(CreateSessionStorageAssociatedCommand(
tab->restore_tab_helper()->session_id(),
session_storage_namespace->persistent_id()));
@@ -621,7 +622,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().GetSessionStorageNamespaceMap()
+ .find("")->second;
session_storage_namespace->SetShouldPersist(false);
TabClosed(tab->restore_tab_helper()->window_id(),
tab->restore_tab_helper()->session_id(),
@@ -1346,7 +1348,8 @@ 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().GetSessionStorageNamespaceMap()
+ .find("")->second;
ScheduleCommand(CreateSessionStorageAssociatedCommand(
tab->restore_tab_helper()->session_id(),
session_storage_namespace->persistent_id()));

Powered by Google App Engine
This is Rietveld 408576698