Index: components/sync/engine_impl/commit.cc |
diff --git a/sync/engine/commit.cc b/components/sync/engine_impl/commit.cc |
similarity index 81% |
rename from sync/engine/commit.cc |
rename to components/sync/engine_impl/commit.cc |
index 66d0824fdd32c5a9ba31a3d17dfb96f460dbdd6f..3ce709c8d006e5c9a1b27f4e52be83256d2d1051 100644 |
--- a/sync/engine/commit.cc |
+++ b/components/sync/engine_impl/commit.cc |
@@ -2,21 +2,21 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "sync/engine/commit.h" |
+#include "components/sync/engine_impl/commit.h" |
#include <stddef.h> |
#include "base/metrics/sparse_histogram.h" |
#include "base/trace_event/trace_event.h" |
-#include "sync/engine/commit_contribution.h" |
-#include "sync/engine/commit_processor.h" |
-#include "sync/engine/commit_util.h" |
-#include "sync/engine/syncer.h" |
-#include "sync/engine/syncer_proto_util.h" |
-#include "sync/internal_api/public/events/commit_request_event.h" |
-#include "sync/internal_api/public/events/commit_response_event.h" |
-#include "sync/sessions/sync_session.h" |
-#include "sync/util/data_type_histogram.h" |
+#include "components/sync/base/data_type_histogram.h" |
+#include "components/sync/engine/events/commit_request_event.h" |
+#include "components/sync/engine/events/commit_response_event.h" |
+#include "components/sync/engine_impl/commit_contribution.h" |
+#include "components/sync/engine_impl/commit_processor.h" |
+#include "components/sync/engine_impl/commit_util.h" |
+#include "components/sync/engine_impl/syncer.h" |
+#include "components/sync/engine_impl/syncer_proto_util.h" |
+#include "components/sync/sessions_impl/sync_session.h" |
namespace syncer { |
@@ -63,16 +63,12 @@ Commit* Commit::Init(ModelTypeSet requested_types, |
ContributionMap::const_iterator it = contributions.find(syncer::BOOKMARKS); |
if (it != contributions.end() && it->second->GetNumEntries() != 0) { |
commit_util::AddExtensionsActivityToMessage( |
- extensions_activity, |
- &extensions_activity_buffer, |
- commit_message); |
+ extensions_activity, &extensions_activity_buffer, commit_message); |
} |
// Set the client config params. |
commit_util::AddClientConfigParamsToMessage( |
- enabled_types, |
- cookie_jar_mismatch, |
- commit_message); |
+ enabled_types, cookie_jar_mismatch, commit_message); |
int previous_message_size = message.ByteSize(); |
// Finally, serialize all our contributions. |
@@ -113,11 +109,9 @@ SyncerError Commit::PostAndProcessResponse( |
DVLOG(1) << "Sending commit message."; |
- CommitRequestEvent request_event( |
- base::Time::Now(), |
- message_.commit().entries_size(), |
- request_types, |
- message_); |
+ CommitRequestEvent request_event(base::Time::Now(), |
+ message_.commit().entries_size(), |
+ request_types, message_); |
session->SendProtocolEvent(request_event); |
TRACE_EVENT_BEGIN0("sync", "PostCommit"); |
@@ -126,10 +120,7 @@ SyncerError Commit::PostAndProcessResponse( |
TRACE_EVENT_END0("sync", "PostCommit"); |
// TODO(rlarocque): Use result that includes errors captured later? |
- CommitResponseEvent response_event( |
- base::Time::Now(), |
- post_result, |
- response_); |
+ CommitResponseEvent response_event(base::Time::Now(), post_result, response_); |
session->SendProtocolEvent(response_event); |
if (post_result != SYNCER_OK) { |
@@ -145,10 +136,9 @@ SyncerError Commit::PostAndProcessResponse( |
size_t message_entries = message_.commit().entries_size(); |
size_t response_entries = response_.commit().entryresponse_size(); |
if (message_entries != response_entries) { |
- LOG(ERROR) |
- << "Commit response has wrong number of entries! " |
- << "Expected: " << message_entries << ", " |
- << "Got: " << response_entries; |
+ LOG(ERROR) << "Commit response has wrong number of entries! " |
+ << "Expected: " << message_entries << ", " |
+ << "Got: " << response_entries; |
return SERVER_RESPONSE_VALIDATION_FAILED; |
} |
@@ -162,8 +152,8 @@ SyncerError Commit::PostAndProcessResponse( |
SyncerError processing_result = SYNCER_OK; |
for (ContributionMap::const_iterator it = contributions_.begin(); |
it != contributions_.end(); ++it) { |
- TRACE_EVENT1("sync", "ProcessCommitResponse", |
- "type", ModelTypeToString(it->first)); |
+ TRACE_EVENT1("sync", "ProcessCommitResponse", "type", |
+ ModelTypeToString(it->first)); |
SyncerError type_result = |
it->second->ProcessCommitResponse(response_, status); |
if (type_result == SERVER_RETURN_CONFLICT) { |
@@ -175,8 +165,9 @@ SyncerError Commit::PostAndProcessResponse( |
} |
// Handle bookmarks' special extensions activity stats. |
- if (session->status_controller(). |
- model_neutral_state().num_successful_bookmark_commits == 0) { |
+ if (session->status_controller() |
+ .model_neutral_state() |
+ .num_successful_bookmark_commits == 0) { |
extensions_activity->PutRecords(extensions_activity_buffer_); |
} |