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

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

Issue 2493573002: Make sure that the browser will always restore settings page instead of sign out page after user si… (Closed)
Patch Set: rebase from master Created 4 years, 1 month 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/sessions/session_common_utils_unittest.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sessions/session_restore.cc
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index 87a44c4fb57615b643b7c68324c40ebcf61fa76f..a4184999051a3dfb15435cc36f41d0e36b35503a 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -588,10 +588,7 @@ class SessionRestoreImpl : public content::NotificationObserver {
// See crbug.com/154129.
if (tab.navigations.empty())
return nullptr;
- int selected_index = tab.current_navigation_index;
- selected_index = std::max(
- 0,
- std::min(selected_index, static_cast<int>(tab.navigations.size() - 1)));
+ int selected_index = GetNavigationIndexToSelect(tab);
RecordAppLaunchForTab(browser, tab, selected_index);
« no previous file with comments | « chrome/browser/sessions/session_common_utils_unittest.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698