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

Unified Diff: components/sync/engine_impl/get_updates_processor.cc

Issue 2376123003: [Sync] Move //components/sync to the syncer namespace. (Closed)
Patch Set: Fix tools and iOS. Created 4 years, 3 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: components/sync/engine_impl/get_updates_processor.cc
diff --git a/components/sync/engine_impl/get_updates_processor.cc b/components/sync/engine_impl/get_updates_processor.cc
index 92520abb8349fc2995a16b62398f30a11e1edbcf..b4c09a9b9708089937d0e60b4a5036ca70043467 100644
--- a/components/sync/engine_impl/get_updates_processor.cc
+++ b/components/sync/engine_impl/get_updates_processor.cc
@@ -7,6 +7,7 @@
#include <stddef.h>
#include <map>
+#include <utility>
#include "base/trace_event/trace_event.h"
#include "components/sync/engine/events/get_updates_response_event.h"
@@ -20,15 +21,14 @@
#include "components/sync/syncable/nigori_handler.h"
#include "components/sync/syncable/syncable_read_transaction.h"
-typedef std::vector<const sync_pb::SyncEntity*> SyncEntityList;
-typedef std::map<syncer::ModelType, SyncEntityList> TypeSyncEntityMap;
-
namespace syncer {
-typedef std::map<ModelType, size_t> TypeToIndexMap;
-
namespace {
+typedef std::vector<const sync_pb::SyncEntity*> SyncEntityList;
+typedef std::map<ModelType, SyncEntityList> TypeSyncEntityMap;
+typedef std::map<ModelType, size_t> TypeToIndexMap;
+
bool ShouldRequestEncryptionKey(SyncCycleContext* context) {
syncable::Directory* dir = context->directory();
syncable::ReadTransaction trans(FROM_HERE, dir);
@@ -287,9 +287,9 @@ SyncerError GetUpdatesProcessor::ProcessResponse(
return SERVER_RESPONSE_VALIDATION_FAILED;
}
- syncer::SyncerError result =
+ SyncerError result =
ProcessGetUpdatesResponse(request_types, gu_response, status);
- if (result != syncer::SYNCER_OK)
+ if (result != SYNCER_OK)
return result;
if (gu_response.changes_remaining() == 0) {
@@ -299,7 +299,7 @@ SyncerError GetUpdatesProcessor::ProcessResponse(
}
}
-syncer::SyncerError GetUpdatesProcessor::ProcessGetUpdatesResponse(
+SyncerError GetUpdatesProcessor::ProcessGetUpdatesResponse(
ModelTypeSet gu_types,
const sync_pb::GetUpdatesResponse& gu_response,
StatusController* status_controller) {
@@ -312,7 +312,7 @@ syncer::SyncerError GetUpdatesProcessor::ProcessGetUpdatesResponse(
&progress_index_by_type);
if (gu_types.Size() != progress_index_by_type.size()) {
NOTREACHED() << "Missing progress markers in GetUpdates response.";
- return syncer::SERVER_RESPONSE_VALIDATION_FAILED;
+ return SERVER_RESPONSE_VALIDATION_FAILED;
}
TypeToIndexMap context_by_type;
@@ -337,11 +337,11 @@ syncer::SyncerError GetUpdatesProcessor::ProcessGetUpdatesResponse(
context.CopyFrom(gu_response.context_mutations(context_iter->second));
if (update_handler_iter != update_handler_map_->end()) {
- syncer::SyncerError result =
+ SyncerError result =
update_handler_iter->second->ProcessGetUpdatesResponse(
gu_response.new_progress_marker(progress_marker_iter->second),
context, updates_iter->second, status_controller);
- if (result != syncer::SYNCER_OK)
+ if (result != SYNCER_OK)
return result;
} else {
DLOG(WARNING) << "Ignoring received updates of a type we can't handle. "
@@ -352,7 +352,7 @@ syncer::SyncerError GetUpdatesProcessor::ProcessGetUpdatesResponse(
DCHECK(progress_marker_iter == progress_index_by_type.end() &&
updates_iter == updates_by_type.end());
- return syncer::SYNCER_OK;
+ return SYNCER_OK;
}
void GetUpdatesProcessor::ApplyUpdates(ModelTypeSet gu_types,

Powered by Google App Engine
This is Rietveld 408576698