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

Side by Side Diff: components/sync/engine_impl/commit.cc

Issue 2388163002: [Sync] Move //components/sync to the syncer namespace, take 2. (Closed)
Patch Set: Rebase. Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/sync/engine_impl/commit.h" 5 #include "components/sync/engine_impl/commit.h"
6 6
7 #include "base/metrics/sparse_histogram.h" 7 #include "base/metrics/sparse_histogram.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "components/sync/base/data_type_histogram.h" 9 #include "components/sync/base/data_type_histogram.h"
10 #include "components/sync/engine/events/commit_request_event.h" 10 #include "components/sync/engine/events/commit_request_event.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 sync_pb::ClientToServerMessage message; 51 sync_pb::ClientToServerMessage message;
52 message.set_message_contents(sync_pb::ClientToServerMessage::COMMIT); 52 message.set_message_contents(sync_pb::ClientToServerMessage::COMMIT);
53 message.set_share(account_name); 53 message.set_share(account_name);
54 54
55 sync_pb::CommitMessage* commit_message = message.mutable_commit(); 55 sync_pb::CommitMessage* commit_message = message.mutable_commit();
56 commit_message->set_cache_guid(cache_guid); 56 commit_message->set_cache_guid(cache_guid);
57 57
58 // Set extensions activity if bookmark commits are present. 58 // Set extensions activity if bookmark commits are present.
59 ExtensionsActivity::Records extensions_activity_buffer; 59 ExtensionsActivity::Records extensions_activity_buffer;
60 ContributionMap::const_iterator it = contributions.find(syncer::BOOKMARKS); 60 ContributionMap::const_iterator it = contributions.find(BOOKMARKS);
61 if (it != contributions.end() && it->second->GetNumEntries() != 0) { 61 if (it != contributions.end() && it->second->GetNumEntries() != 0) {
62 commit_util::AddExtensionsActivityToMessage( 62 commit_util::AddExtensionsActivityToMessage(
63 extensions_activity, &extensions_activity_buffer, commit_message); 63 extensions_activity, &extensions_activity_buffer, commit_message);
64 } 64 }
65 65
66 // Set the client config params. 66 // Set the client config params.
67 commit_util::AddClientConfigParamsToMessage( 67 commit_util::AddClientConfigParamsToMessage(
68 enabled_types, cookie_jar_mismatch, commit_message); 68 enabled_types, cookie_jar_mismatch, commit_message);
69 69
70 int previous_message_size = message.ByteSize(); 70 int previous_message_size = message.ByteSize();
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 void Commit::CleanUp() { 174 void Commit::CleanUp() {
175 for (ContributionMap::const_iterator it = contributions_.begin(); 175 for (ContributionMap::const_iterator it = contributions_.begin();
176 it != contributions_.end(); ++it) { 176 it != contributions_.end(); ++it) {
177 it->second->CleanUp(); 177 it->second->CleanUp();
178 } 178 }
179 cleaned_up_ = true; 179 cleaned_up_ = true;
180 } 180 }
181 181
182 } // namespace syncer 182 } // namespace syncer
OLDNEW
« no previous file with comments | « components/sync/engine/cycle/type_debug_info_observer.h ('k') | components/sync/engine_impl/commit_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698