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

Unified Diff: chrome/browser/android/foreign_session_helper.cc

Issue 510043002: Fix foreign tabs with > 6 navigations not showing up on Android, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/foreign_session_helper.cc
diff --git a/chrome/browser/android/foreign_session_helper.cc b/chrome/browser/android/foreign_session_helper.cc
index f1b35656673af4d3bef953110ac605f67e658dce..57f3405f12a5f8950b446db4dd9f11cd10f410ed 100644
--- a/chrome/browser/android/foreign_session_helper.cc
+++ b/chrome/browser/android/foreign_session_helper.cc
@@ -50,11 +50,7 @@ bool ShouldSkipTab(const SessionTab& session_tab) {
if (session_tab.navigations.empty())
return true;
- int selected_index = session_tab.current_navigation_index;
- if (selected_index < 0 ||
- selected_index >= static_cast<int>(session_tab.navigations.size()))
- return true;
-
+ int selected_index = session_tab.normalized_navigation_index();
const ::sessions::SerializedNavigationEntry& current_navigation =
session_tab.navigations.at(selected_index);
@@ -95,7 +91,7 @@ void CopyTabsToJava(
if (ShouldSkipTab(session_tab))
continue;
- int selected_index = session_tab.current_navigation_index;
+ int selected_index = session_tab.normalized_navigation_index();
DCHECK(selected_index >= 0);
DCHECK(selected_index < static_cast<int>(session_tab.navigations.size()));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698