| OLD | NEW |
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/metrics/sparse_histogram.h" | 9 #include "base/metrics/sparse_histogram.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 sync_pb::ClientToServerMessage message; | 54 sync_pb::ClientToServerMessage message; |
| 55 message.set_message_contents(sync_pb::ClientToServerMessage::COMMIT); | 55 message.set_message_contents(sync_pb::ClientToServerMessage::COMMIT); |
| 56 message.set_share(account_name); | 56 message.set_share(account_name); |
| 57 | 57 |
| 58 sync_pb::CommitMessage* commit_message = message.mutable_commit(); | 58 sync_pb::CommitMessage* commit_message = message.mutable_commit(); |
| 59 commit_message->set_cache_guid(cache_guid); | 59 commit_message->set_cache_guid(cache_guid); |
| 60 | 60 |
| 61 // Set extensions activity if bookmark commits are present. | 61 // Set extensions activity if bookmark commits are present. |
| 62 ExtensionsActivity::Records extensions_activity_buffer; | 62 ExtensionsActivity::Records extensions_activity_buffer; |
| 63 ContributionMap::const_iterator it = contributions.find(syncer::BOOKMARKS); | 63 ContributionMap::const_iterator it = contributions.find(BOOKMARKS); |
| 64 if (it != contributions.end() && it->second->GetNumEntries() != 0) { | 64 if (it != contributions.end() && it->second->GetNumEntries() != 0) { |
| 65 commit_util::AddExtensionsActivityToMessage( | 65 commit_util::AddExtensionsActivityToMessage( |
| 66 extensions_activity, &extensions_activity_buffer, commit_message); | 66 extensions_activity, &extensions_activity_buffer, commit_message); |
| 67 } | 67 } |
| 68 | 68 |
| 69 // Set the client config params. | 69 // Set the client config params. |
| 70 commit_util::AddClientConfigParamsToMessage( | 70 commit_util::AddClientConfigParamsToMessage( |
| 71 enabled_types, cookie_jar_mismatch, commit_message); | 71 enabled_types, cookie_jar_mismatch, commit_message); |
| 72 | 72 |
| 73 int previous_message_size = message.ByteSize(); | 73 int previous_message_size = message.ByteSize(); |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 | 176 |
| 177 void Commit::CleanUp() { | 177 void Commit::CleanUp() { |
| 178 for (ContributionMap::const_iterator it = contributions_.begin(); | 178 for (ContributionMap::const_iterator it = contributions_.begin(); |
| 179 it != contributions_.end(); ++it) { | 179 it != contributions_.end(); ++it) { |
| 180 it->second->CleanUp(); | 180 it->second->CleanUp(); |
| 181 } | 181 } |
| 182 cleaned_up_ = true; | 182 cleaned_up_ = true; |
| 183 } | 183 } |
| 184 | 184 |
| 185 } // namespace syncer | 185 } // namespace syncer |
| OLD | NEW |