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

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: upload before commit. 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
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a38e31a4ef4ea38cf2edf0efc4d5612dab1dd2d8 100644
--- a/chrome/browser/sync/sessions/sync_session.cc
+++ b/chrome/browser/sync/sessions/sync_session.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -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) {
+ routing_info_[it->first] = it->second;
+ }
}
void SyncSession::ResetTransientState() {
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698