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

Unified Diff: sync/engine/non_blocking_type_commit_contribution.cc

Issue 1285443002: move V2 classes in chrome/engine to syncer_v2 namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « sync/engine/non_blocking_type_commit_contribution.h ('k') | sync/internal_api/public/sync_context.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/non_blocking_type_commit_contribution.cc
diff --git a/sync/engine/non_blocking_type_commit_contribution.cc b/sync/engine/non_blocking_type_commit_contribution.cc
index a3793ffe9b0374e2801e61005deb1f5fc9b033d0..9896f2e8cfc8c6caeab5c6cdd3fb1ac3a2cf1364 100644
--- a/sync/engine/non_blocking_type_commit_contribution.cc
+++ b/sync/engine/non_blocking_type_commit_contribution.cc
@@ -9,7 +9,7 @@
#include "sync/internal_api/public/non_blocking_sync_common.h"
#include "sync/protocol/proto_value_conversions.h"
-namespace syncer {
+namespace syncer_v2 {
NonBlockingTypeCommitContribution::NonBlockingTypeCommitContribution(
const sync_pb::DataTypeContext& context,
@@ -39,16 +39,16 @@ void NonBlockingTypeCommitContribution::AddToCommitMessage(
commit_message->add_client_contexts()->CopyFrom(context_);
}
-SyncerError NonBlockingTypeCommitContribution::ProcessCommitResponse(
+syncer::SyncerError NonBlockingTypeCommitContribution::ProcessCommitResponse(
const sync_pb::ClientToServerResponse& response,
- sessions::StatusController* status) {
+ syncer::sessions::StatusController* status) {
const sync_pb::CommitResponse& commit_response = response.commit();
bool transient_error = false;
bool commit_conflict = false;
bool unknown_error = false;
- syncer_v2::CommitResponseDataList response_list;
+ CommitResponseDataList response_list;
for (size_t i = 0; i < sequence_numbers_.size(); ++i) {
const sync_pb::CommitResponse_EntryResponse& entry_response =
@@ -57,18 +57,18 @@ SyncerError NonBlockingTypeCommitContribution::ProcessCommitResponse(
switch (entry_response.response_type()) {
case sync_pb::CommitResponse::INVALID_MESSAGE:
LOG(ERROR) << "Server reports commit message is invalid.";
- DLOG(ERROR) << "Message was: " << SyncEntityToValue(entities_.Get(i),
- false);
+ DLOG(ERROR) << "Message was: "
+ << syncer::SyncEntityToValue(entities_.Get(i), false);
unknown_error = true;
break;
case sync_pb::CommitResponse::CONFLICT:
DVLOG(1) << "Server reports conflict for commit message.";
- DVLOG(1) << "Message was: " << SyncEntityToValue(entities_.Get(i),
- false);
+ DVLOG(1) << "Message was: "
+ << syncer::SyncEntityToValue(entities_.Get(i), false);
commit_conflict = true;
break;
case sync_pb::CommitResponse::SUCCESS: {
- syncer_v2::CommitResponseData response_data;
+ CommitResponseData response_data;
response_data.id = entry_response.id_string();
response_data.client_tag_hash =
entities_.Get(i).client_defined_unique_tag();
@@ -95,13 +95,13 @@ SyncerError NonBlockingTypeCommitContribution::ProcessCommitResponse(
// Let the scheduler know about the failures.
if (unknown_error) {
- return SERVER_RETURN_UNKNOWN_ERROR;
+ return syncer::SERVER_RETURN_UNKNOWN_ERROR;
} else if (transient_error) {
- return SERVER_RETURN_TRANSIENT_ERROR;
+ return syncer::SERVER_RETURN_TRANSIENT_ERROR;
} else if (commit_conflict) {
- return SERVER_RETURN_CONFLICT;
+ return syncer::SERVER_RETURN_CONFLICT;
} else {
- return SYNCER_OK;
+ return syncer::SYNCER_OK;
}
}
« no previous file with comments | « sync/engine/non_blocking_type_commit_contribution.h ('k') | sync/internal_api/public/sync_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698