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

Unified Diff: chrome/browser/ui/browser_tabrestore.cc

Issue 10850010: Make session restore understand that tabs have multiple SessionStorageNamespaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: attempt to fix unittsets. 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
« no previous file with comments | « chrome/browser/ui/browser_tabrestore.h ('k') | chrome/test/base/in_process_browser_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_tabrestore.cc
diff --git a/chrome/browser/ui/browser_tabrestore.cc b/chrome/browser/ui/browser_tabrestore.cc
index 566cb863865c01647d3154c57bb697cff00152b7..f00e389406046a74a963184e7635802091b2f099 100644
--- a/chrome/browser/ui/browser_tabrestore.cc
+++ b/chrome/browser/ui/browser_tabrestore.cc
@@ -40,22 +40,15 @@ content::WebContents* AddRestoredTab(
bool select,
bool pin,
bool from_last_session,
- content::SessionStorageNamespace* session_storage_namespace,
+ const content::SessionStorageNamespaceMap& storage_namespace_map,
const std::string& user_agent_override) {
GURL restore_url = navigations.at(selected_navigation).virtual_url();
- // TODO(ajwong): Remove the temporary session_storage_namespace_map when
- // we teach session restore to understand that one tab can have multiple
- // SessionStorageNamespace objects. Also remove the
- // session_storage_namespace.h include since we only need that to assign
- // into the map.
- content::SessionStorageNamespaceMap session_storage_namespace_map;
- session_storage_namespace_map[""] = session_storage_namespace;
TabContents* tab_contents = chrome::TabContentsWithSessionStorageFactory(
browser->profile(),
tab_util::GetSiteInstanceForNewTab(browser->profile(), restore_url),
MSG_ROUTING_NONE,
chrome::GetActiveWebContents(browser),
- session_storage_namespace_map);
+ storage_namespace_map);
WebContents* new_tab = tab_contents->web_contents();
tab_contents->extension_tab_helper()->SetExtensionAppById(extension_app_id);
std::vector<NavigationEntry*> entries;
@@ -102,22 +95,15 @@ void ReplaceRestoredTab(
int selected_navigation,
bool from_last_session,
const std::string& extension_app_id,
- content::SessionStorageNamespace* session_storage_namespace,
+ const content::SessionStorageNamespaceMap& storage_namespace_map,
const std::string& user_agent_override) {
GURL restore_url = navigations.at(selected_navigation).virtual_url();
- // TODO(ajwong): Remove the temporary session_storage_namespace_map when
- // we teach session restore to understand that one tab can have multiple
- // SessionStorageNamespace objects. Also remove the
- // session_storage_namespace.h include since we only need that to assign
- // into the map.
- content::SessionStorageNamespaceMap session_storage_namespace_map;
- session_storage_namespace_map[""] = session_storage_namespace;
TabContents* tab_contents = chrome::TabContentsWithSessionStorageFactory(
browser->profile(),
tab_util::GetSiteInstanceForNewTab(browser->profile(), restore_url),
MSG_ROUTING_NONE,
GetActiveWebContents(browser),
- session_storage_namespace_map);
+ storage_namespace_map);
tab_contents->extension_tab_helper()->SetExtensionAppById(extension_app_id);
WebContents* replacement = tab_contents->web_contents();
replacement->SetUserAgentOverride(user_agent_override);
« no previous file with comments | « chrome/browser/ui/browser_tabrestore.h ('k') | chrome/test/base/in_process_browser_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698