summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sync/engine/sync_scheduler.cc
diff options
context:
space:
mode:
authorakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-08 19:26:11 +0000
committerakalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-08 19:26:11 +0000
commit334e0cd1ff440365b1f3b28630362ede5548f400 (patch)
tree21bd11c1c63da39d65eb1135731cffc390addab1 /chrome/browser/sync/engine/sync_scheduler.cc
parent4352cdc7cd0f295952c1d9cec49b37beb7f6fae9 (diff)
downloadchromium_src-334e0cd1ff440365b1f3b28630362ede5548f400.zip
chromium_src-334e0cd1ff440365b1f3b28630362ede5548f400.tar.gz
chromium_src-334e0cd1ff440365b1f3b28630362ede5548f400.tar.bz2
[Sync] Replace all instances of ModelTypeBitSet with ModelEnumSet
Also introduce FullModelEnumSet for use cases that work with UNSPECIFIED and TOP_LEVEL_FOLDER types. Remove all functions that work with ModelTypeBitSet. BUG=79970 TEST= Review URL: http://codereview.chromium.org/8851004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113639 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sync/engine/sync_scheduler.cc')
-rw-r--r--chrome/browser/sync/engine/sync_scheduler.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/sync/engine/sync_scheduler.cc b/chrome/browser/sync/engine/sync_scheduler.cc
index 138abb8..2af0ba3 100644
--- a/chrome/browser/sync/engine/sync_scheduler.cc
+++ b/chrome/browser/sync/engine/sync_scheduler.cc
@@ -26,8 +26,9 @@ namespace browser_sync {
using sessions::SyncSession;
using sessions::SyncSessionSnapshot;
using sessions::SyncSourceInfo;
+using syncable::ModelEnumSet;
+using syncable::ModelEnumSetToString;
using syncable::ModelTypePayloadMap;
-using syncable::ModelTypeBitSet;
using sync_pb::GetUpdatesCallerInfo;
namespace {
@@ -459,13 +460,13 @@ void SyncScheduler::ScheduleCleanupDisabledTypes() {
void SyncScheduler::ScheduleNudge(
const TimeDelta& delay,
- NudgeSource source, syncable::ModelEnumSet types,
+ NudgeSource source, ModelEnumSet types,
const tracked_objects::Location& nudge_location) {
DCHECK_EQ(MessageLoop::current(), sync_loop_);
SDVLOG_LOC(nudge_location, 2)
<< "Nudge scheduled with delay " << delay.InMilliseconds() << " ms, "
<< "source " << GetNudgeSourceString(source) << ", "
- << "types " << syncable::ModelEnumSetToString(types);
+ << "types " << ModelEnumSetToString(types);
ModelTypePayloadMap types_with_payloads =
syncable::ModelTypePayloadMapFromEnumSet(types, std::string());
@@ -562,7 +563,7 @@ void SyncScheduler::ScheduleNudgeImpl(
// Helper to extract the routing info and workers corresponding to types in
// |types| from |registrar|.
-void GetModelSafeParamsForTypes(syncable::ModelEnumSet types,
+void GetModelSafeParamsForTypes(ModelEnumSet types,
ModelSafeWorkerRegistrar* registrar, ModelSafeRoutingInfo* routes,
std::vector<ModelSafeWorker*>* workers) {
ModelSafeRoutingInfo r_tmp;
@@ -573,7 +574,7 @@ void GetModelSafeParamsForTypes(syncable::ModelEnumSet types,
bool passive_group_added = false;
typedef std::vector<ModelSafeWorker*>::const_iterator iter;
- for (syncable::ModelEnumSet::Iterator it = types.First();
+ for (ModelEnumSet::Iterator it = types.First();
it.Good(); it.Inc()) {
const syncable::ModelType t = it.Get();
DCHECK_EQ(1U, r_tmp.count(t));
@@ -605,7 +606,7 @@ void GetModelSafeParamsForTypes(syncable::ModelEnumSet types,
}
void SyncScheduler::ScheduleConfig(
- syncable::ModelEnumSet types,
+ ModelEnumSet types,
GetUpdatesCallerInfo::GetUpdatesSource source) {
DCHECK_EQ(MessageLoop::current(), sync_loop_);
DCHECK(IsConfigRelatedUpdateSourceValue(source));