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

Unified Diff: chrome/browser/sync/engine/sync_scheduler.cc

Issue 7719011: Move some files from sync/engine to internal_api (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 4 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/engine/sync_scheduler.cc
diff --git a/chrome/browser/sync/engine/sync_scheduler.cc b/chrome/browser/sync/engine/sync_scheduler.cc
index 993b72755abcd019a89a4ff8380c7a91d5c9dbac..93a5765bbbcd88d8fa095d6dec0a11388ec46817 100644
--- a/chrome/browser/sync/engine/sync_scheduler.cc
+++ b/chrome/browser/sync/engine/sync_scheduler.cc
@@ -104,24 +104,6 @@ GetUpdatesCallerInfo::GetUpdatesSource GetUpdatesFromNudgeSource(
}
}
-GetUpdatesCallerInfo::GetUpdatesSource GetSourceFromReason(
- sync_api::ConfigureReason reason) {
- switch (reason) {
- case sync_api::CONFIGURE_REASON_RECONFIGURATION:
- return GetUpdatesCallerInfo::RECONFIGURATION;
- case sync_api::CONFIGURE_REASON_MIGRATION:
- return GetUpdatesCallerInfo::MIGRATION;
- case sync_api::CONFIGURE_REASON_NEW_CLIENT:
- return GetUpdatesCallerInfo::NEW_CLIENT;
- case sync_api::CONFIGURE_REASON_NEWLY_ENABLED_DATA_TYPE:
- return GetUpdatesCallerInfo::NEWLY_SUPPORTED_DATATYPE;
- default:
- NOTREACHED();
- }
-
- return GetUpdatesCallerInfo::UNKNOWN;
-}
-
SyncScheduler::WaitInterval::WaitInterval(Mode mode, TimeDelta length)
: mode(mode), had_nudge(false), length(length) { }
@@ -571,8 +553,9 @@ void GetModelSafeParamsForTypes(const ModelTypeBitSet& types,
}
}
-void SyncScheduler::ScheduleConfig(const ModelTypeBitSet& types,
- sync_api::ConfigureReason reason) {
+void SyncScheduler::ScheduleConfig(
+ const ModelTypeBitSet& types,
+ GetUpdatesCallerInfo::GetUpdatesSource source) {
DCHECK_EQ(MessageLoop::current(), sync_loop_);
SVLOG(2) << "Scheduling a config";
ModelSafeRoutingInfo routes;
@@ -582,8 +565,7 @@ void SyncScheduler::ScheduleConfig(const ModelTypeBitSet& types,
PostTask(FROM_HERE, "ScheduleConfigImpl",
method_factory_.NewRunnableMethod(
- &SyncScheduler::ScheduleConfigImpl, routes, workers,
- GetSourceFromReason(reason)));
+ &SyncScheduler::ScheduleConfigImpl, routes, workers, source));
}
void SyncScheduler::ScheduleConfigImpl(

Powered by Google App Engine
This is Rietveld 408576698