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

Unified Diff: chrome/browser/sync/sessions/sync_session.cc

Issue 6812004: sync: Make nudge + config jobs reliable in SyncerThread2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing CR feedback. Created 9 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
Index: chrome/browser/sync/sessions/sync_session.cc
diff --git a/chrome/browser/sync/sessions/sync_session.cc b/chrome/browser/sync/sessions/sync_session.cc
index cd01375d627e19dcf9dabc04a35970ddac393a92..bff0063c6a1f0dba9c0facab6f9ed3bf9a22c755 100644
--- a/chrome/browser/sync/sessions/sync_session.cc
+++ b/chrome/browser/sync/sessions/sync_session.cc
@@ -41,11 +41,14 @@ void SyncSession::Coalesce(const SyncSession& session) {
std::back_inserter(temp));
workers_.swap(temp);
- ModelSafeRoutingInfo temp_r;
- std::set_union(routing_info_.begin(), routing_info_.end(),
- session.routing_info_.begin(), session.routing_info_.end(),
- std::insert_iterator<ModelSafeRoutingInfo>(temp_r, temp_r.begin()));
- routing_info_.swap(temp_r);
+ // We have to update the model safe routing info to the union. In case the
+ // same key is present in both pick the one from session.
+ for (ModelSafeRoutingInfo::const_iterator it =
+ session.routing_info_.begin();
+ it != session.routing_info_.end();
+ it++) {
tim (not reviewing) 2011/04/13 21:40:18 use ++it
lipalani1 2011/04/13 22:45:14 Done.
+ routing_info_[it->first] = it->second;
+ }
}
void SyncSession::ResetTransientState() {

Powered by Google App Engine
This is Rietveld 408576698