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

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

Issue 1343833002: Abstract content::SessionStorageNamespace from core TabRestore code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@extension_tab_helper
Patch Set: Response to review Created 5 years, 3 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_tab_restore_service_delegate.h ('k') | components/sessions.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_tab_restore_service_delegate.cc
diff --git a/chrome/browser/ui/browser_tab_restore_service_delegate.cc b/chrome/browser/ui/browser_tab_restore_service_delegate.cc
index 56eb3f4245f5a75e6134a73c4dbc7552440ca915..42779e6c981293fcd49933f96bb67794c66b6027 100644
--- a/chrome/browser/ui/browser_tab_restore_service_delegate.cc
+++ b/chrome/browser/ui/browser_tab_restore_service_delegate.cc
@@ -10,7 +10,9 @@
#include "chrome/browser/ui/browser_tabrestore.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "components/sessions/content/content_tab_client_data.h"
#include "content/public/browser/navigation_controller.h"
+#include "content/public/browser/session_storage_namespace.h"
using content::NavigationController;
using content::SessionStorageNamespace;
@@ -50,15 +52,20 @@ bool BrowserTabRestoreServiceDelegate::IsTabPinned(int index) const {
}
WebContents* BrowserTabRestoreServiceDelegate::AddRestoredTab(
- const std::vector<sessions::SerializedNavigationEntry>& navigations,
- int tab_index,
- int selected_navigation,
- const std::string& extension_app_id,
- bool select,
- bool pin,
- bool from_last_session,
- SessionStorageNamespace* storage_namespace,
- const std::string& user_agent_override) {
+ const std::vector<sessions::SerializedNavigationEntry>& navigations,
+ int tab_index,
+ int selected_navigation,
+ const std::string& extension_app_id,
+ bool select,
+ bool pin,
+ bool from_last_session,
+ const sessions::TabClientData* tab_client_data,
+ const std::string& user_agent_override) {
+ SessionStorageNamespace* storage_namespace =
+ tab_client_data
+ ? static_cast<const sessions::ContentTabClientData*>(tab_client_data)
+ ->session_storage_namespace()
+ : nullptr;
return chrome::AddRestoredTab(browser_, navigations, tab_index,
selected_navigation, extension_app_id, select,
pin, from_last_session, storage_namespace,
@@ -66,15 +73,20 @@ WebContents* BrowserTabRestoreServiceDelegate::AddRestoredTab(
}
WebContents* BrowserTabRestoreServiceDelegate::ReplaceRestoredTab(
- const std::vector<sessions::SerializedNavigationEntry>& navigations,
- int selected_navigation,
- bool from_last_session,
- const std::string& extension_app_id,
- SessionStorageNamespace* session_storage_namespace,
- const std::string& user_agent_override) {
+ const std::vector<sessions::SerializedNavigationEntry>& navigations,
+ int selected_navigation,
+ bool from_last_session,
+ const std::string& extension_app_id,
+ const sessions::TabClientData* tab_client_data,
+ const std::string& user_agent_override) {
+ SessionStorageNamespace* storage_namespace =
+ tab_client_data
+ ? static_cast<const sessions::ContentTabClientData*>(tab_client_data)
+ ->session_storage_namespace()
+ : nullptr;
return chrome::ReplaceRestoredTab(browser_, navigations, selected_navigation,
- from_last_session, extension_app_id,
- session_storage_namespace, user_agent_override);
+ from_last_session, extension_app_id,
+ storage_namespace, user_agent_override);
}
void BrowserTabRestoreServiceDelegate::CloseTab() {
« no previous file with comments | « chrome/browser/ui/browser_tab_restore_service_delegate.h ('k') | components/sessions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698