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

Side by Side Diff: chrome/browser/sync/engine/sync_scheduler.cc

Issue 8786014: [Sync] Convert sessions/ directory to ModelEnumSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/sync/engine/syncer_proto_util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/engine/sync_scheduler.h" 5 #include "chrome/browser/sync/engine/sync_scheduler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 registrar->GetWorkers(&w_tmp); 571 registrar->GetWorkers(&w_tmp);
572 572
573 bool passive_group_added = false; 573 bool passive_group_added = false;
574 574
575 typedef std::vector<ModelSafeWorker*>::const_iterator iter; 575 typedef std::vector<ModelSafeWorker*>::const_iterator iter;
576 for (syncable::ModelEnumSet::Iterator it = types.First(); 576 for (syncable::ModelEnumSet::Iterator it = types.First();
577 it.Good(); it.Inc()) { 577 it.Good(); it.Inc()) {
578 const syncable::ModelType t = it.Get(); 578 const syncable::ModelType t = it.Get();
579 DCHECK_EQ(1U, r_tmp.count(t)); 579 DCHECK_EQ(1U, r_tmp.count(t));
580 (*routes)[t] = r_tmp[t]; 580 (*routes)[t] = r_tmp[t];
581 iter w_tmp_it = std::find_if(w_tmp.begin(), w_tmp.end(), 581 iter it = std::find_if(w_tmp.begin(), w_tmp.end(),
582 ModelSafeWorkerGroupIs(r_tmp[t])); 582 ModelSafeWorkerGroupIs(r_tmp[t]));
583 if (w_tmp_it != w_tmp.end()) { 583 if (it != w_tmp.end()) {
584 iter workers_it = std::find_if(workers->begin(), workers->end(), 584 iter it2 = std::find_if(workers->begin(), workers->end(),
585 ModelSafeWorkerGroupIs(r_tmp[t])); 585 ModelSafeWorkerGroupIs(r_tmp[t]));
586 if (workers_it == workers->end()) 586 if (it2 == workers->end())
Nicolas Zea 2011/12/06 19:41:40 this file is already modified in your other patch
akalin 2011/12/06 19:46:08 Hmm yeah it should be. I'll reupload a patch...
587 workers->push_back(*w_tmp_it); 587 workers->push_back(*it);
588 588
589 if (r_tmp[t] == GROUP_PASSIVE) 589 if (r_tmp[t] == GROUP_PASSIVE)
590 passive_group_added = true; 590 passive_group_added = true;
591 } else { 591 } else {
592 NOTREACHED(); 592 NOTREACHED();
593 } 593 }
594 } 594 }
595 595
596 // Always add group passive. 596 // Always add group passive.
597 if (passive_group_added == false) { 597 if (passive_group_added == false) {
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 1186
1187 #undef SDVLOG_LOC 1187 #undef SDVLOG_LOC
1188 1188
1189 #undef SDVLOG 1189 #undef SDVLOG
1190 1190
1191 #undef SLOG 1191 #undef SLOG
1192 1192
1193 #undef ENUM_CASE 1193 #undef ENUM_CASE
1194 1194
1195 } // browser_sync 1195 } // browser_sync
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/engine/syncer_proto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698