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

Unified Diff: chrome/browser/sync/glue/session_model_associator.cc

Issue 10254023: Fix unit-tests compilation on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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/sync/glue/session_model_associator.cc
diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc
index 28b07c1b1134ce4d3fa51058a7f7bd311d655981..1848a6f18a9078f155c0f5716eedfdeb7ef4971f 100644
--- a/chrome/browser/sync/glue/session_model_associator.cc
+++ b/chrome/browser/sync/glue/session_model_associator.cc
@@ -467,7 +467,8 @@ void SessionModelAssociator::AssociateTabContents(
}
sync_tab->mutable_navigation()->Clear();
- std::vector<SyncedTabNavigation>::const_iterator prev_nav_iter;
+ std::vector<SyncedTabNavigation>::const_iterator prev_nav_iter =
+ prev_tab->synced_tab_navigations.begin();
for (int i = min_index; i < max_index; ++i) {
const NavigationEntry* entry = (i == pending_index) ?
new_tab.GetPendingEntry() : new_tab.GetEntryAtIndex(i);
@@ -476,8 +477,7 @@ void SessionModelAssociator::AssociateTabContents(
// Find the location of the first navigation within the previous list of
// navigations. We only need to do this once, as all subsequent
// navigations are either contiguous or completely new.
- for (prev_nav_iter = prev_tab->synced_tab_navigations.begin();
- prev_nav_iter != prev_tab->synced_tab_navigations.end();
+ for (;prev_nav_iter != prev_tab->synced_tab_navigations.end();
++prev_nav_iter) {
if (prev_nav_iter->unique_id() == entry->GetUniqueID())
break;
« 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