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

Unified Diff: sync/engine/sync_scheduler.cc

Issue 10795018: [Sync] Remove unneeded 'using syncer::' lines and 'syncer::' scopings (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix indent Created 8 years, 5 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: sync/engine/sync_scheduler.cc
diff --git a/sync/engine/sync_scheduler.cc b/sync/engine/sync_scheduler.cc
index 04b30f0d1028bd1a845cc11c3b0a64d441ddd8b2..950c3755b0b3ef47dc951d4d6bef28246f2a078e 100644
--- a/sync/engine/sync_scheduler.cc
+++ b/sync/engine/sync_scheduler.cc
@@ -31,23 +31,22 @@ using sessions::SyncSourceInfo;
using sync_pb::GetUpdatesCallerInfo;
namespace {
-bool ShouldRequestEarlyExit(
- const syncer::SyncProtocolError& error) {
+bool ShouldRequestEarlyExit(const SyncProtocolError& error) {
switch (error.error_type) {
- case syncer::SYNC_SUCCESS:
- case syncer::MIGRATION_DONE:
- case syncer::THROTTLED:
- case syncer::TRANSIENT_ERROR:
+ case SYNC_SUCCESS:
+ case MIGRATION_DONE:
+ case THROTTLED:
+ case TRANSIENT_ERROR:
return false;
- case syncer::NOT_MY_BIRTHDAY:
- case syncer::CLEAR_PENDING:
+ case NOT_MY_BIRTHDAY:
+ case CLEAR_PENDING:
// If we send terminate sync early then |sync_cycle_ended| notification
// would not be sent. If there were no actions then |ACTIONABLE_ERROR|
// notification wouldnt be sent either. Then the UI layer would be left
// waiting forever. So assert we would send something.
- DCHECK(error.action != syncer::UNKNOWN_ACTION);
+ DCHECK(error.action != UNKNOWN_ACTION);
return true;
- case syncer::INVALID_CREDENTIAL:
+ case INVALID_CREDENTIAL:
// The notification for this is handled by PostAndProcessHeaders|.
// Server does no have to send any action for this.
return true;
@@ -59,9 +58,8 @@ bool ShouldRequestEarlyExit(
}
}
-bool IsActionableError(
- const syncer::SyncProtocolError& error) {
- return (error.action != syncer::UNKNOWN_ACTION);
+bool IsActionableError(const SyncProtocolError& error) {
+ return (error.action != UNKNOWN_ACTION);
}
} // namespace
@@ -70,8 +68,8 @@ ConfigurationParams::ConfigurationParams()
keystore_key_status(KEYSTORE_KEY_UNNECESSARY) {}
ConfigurationParams::ConfigurationParams(
const sync_pb::GetUpdatesCallerInfo::GetUpdatesSource& source,
- const syncer::ModelTypeSet& types_to_download,
- const syncer::ModelSafeRoutingInfo& routing_info,
+ const ModelTypeSet& types_to_download,
+ const ModelSafeRoutingInfo& routing_info,
KeystoreKeyStatus keystore_key_status,
const base::Closure& ready_task)
: source(source),
@@ -314,7 +312,7 @@ void BuildModelSafeParams(
active_groups.insert(GROUP_PASSIVE);
for (ModelTypeSet::Iterator iter = types_to_download.First(); iter.Good();
iter.Inc()) {
- syncer::ModelType type = iter.Get();
+ ModelType type = iter.Get();
ModelSafeRoutingInfo::const_iterator route = current_routes.find(type);
DCHECK(route != current_routes.end());
ModelSafeGroup group = route->second;
@@ -345,7 +343,7 @@ bool SyncScheduler::ScheduleConfiguration(const ConfigurationParams& params) {
// TODO(sync): now that ModelChanging commands only use those workers within
// the routing info, we don't really need |restricted_workers|. Remove it.
// crbug.com/133030
- syncer::ModelSafeRoutingInfo restricted_routes;
+ ModelSafeRoutingInfo restricted_routes;
std::vector<ModelSafeWorker*> restricted_workers;
BuildModelSafeParams(params.types_to_download,
params.routing_info,
@@ -447,11 +445,11 @@ SyncScheduler::JobProcessDecision SyncScheduler::DecideOnJob(
return CONTINUE;
// See if our type is throttled.
- syncer::ModelTypeSet throttled_types =
+ ModelTypeSet throttled_types =
session_context_->throttled_data_type_tracker()->GetThrottledTypes();
if (job.purpose == SyncSessionJob::NUDGE &&
job.session->source().updates_source == GetUpdatesCallerInfo::LOCAL) {
- syncer::ModelTypeSet requested_types;
+ ModelTypeSet requested_types;
for (ModelTypePayloadMap::const_iterator i =
job.session->source().types.begin();
i != job.session->source().types.end();
@@ -586,7 +584,7 @@ void SyncScheduler::ScheduleNudgeAsync(
<< "types " << ModelTypeSetToString(types);
ModelTypePayloadMap types_with_payloads =
- syncer::ModelTypePayloadMapFromEnumSet(types, std::string());
+ ModelTypePayloadMapFromEnumSet(types, std::string());
SyncScheduler::ScheduleNudgeImpl(delay,
GetUpdatesFromNudgeSource(source),
types_with_payloads,
@@ -603,7 +601,7 @@ void SyncScheduler::ScheduleNudgeWithPayloadsAsync(
<< "Nudge scheduled with delay " << delay.InMilliseconds() << " ms, "
<< "source " << GetNudgeSourceString(source) << ", "
<< "payloads "
- << syncer::ModelTypePayloadMapToString(types_with_payloads);
+ << ModelTypePayloadMapToString(types_with_payloads);
SyncScheduler::ScheduleNudgeImpl(delay,
GetUpdatesFromNudgeSource(source),
@@ -624,7 +622,7 @@ void SyncScheduler::ScheduleNudgeImpl(
<< delay.InMilliseconds() << " ms, "
<< "source " << GetUpdatesSourceString(source) << ", "
<< "payloads "
- << syncer::ModelTypePayloadMapToString(types_with_payloads)
+ << ModelTypePayloadMapToString(types_with_payloads)
<< (is_canary_job ? " (canary)" : "");
SyncSourceInfo info(source, types_with_payloads);

Powered by Google App Engine
This is Rietveld 408576698