OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/sync/engine/build_commit_command.h" | 5 #include "chrome/browser/sync/engine/build_commit_command.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 if (!session->status_controller()->HasBookmarkCommitActivity()) { | 40 if (!session->status_controller()->HasBookmarkCommitActivity()) { |
41 // Return the records to the activity monitor. | 41 // Return the records to the activity monitor. |
42 monitor->PutRecords(session->extensions_activity()); | 42 monitor->PutRecords(session->extensions_activity()); |
43 session->mutable_extensions_activity()->clear(); | 43 session->mutable_extensions_activity()->clear(); |
44 return; | 44 return; |
45 } | 45 } |
46 const ExtensionsActivityMonitor::Records& records = | 46 const ExtensionsActivityMonitor::Records& records = |
47 session->extensions_activity(); | 47 session->extensions_activity(); |
48 for (ExtensionsActivityMonitor::Records::const_iterator it = records.begin(); | 48 for (ExtensionsActivityMonitor::Records::const_iterator it = records.begin(); |
49 it != records.end(); ++it) { | 49 it != records.end(); ++it) { |
50 sync_pb::CommitMessage_ChromiumExtensionsActivity* activity_message = | 50 sync_pb::ChromiumExtensionsActivity* activity_message = |
51 message->add_extensions_activity(); | 51 message->add_extensions_activity(); |
52 activity_message->set_extension_id(it->second.extension_id); | 52 activity_message->set_extension_id(it->second.extension_id); |
53 activity_message->set_bookmark_writes_since_last_commit( | 53 activity_message->set_bookmark_writes_since_last_commit( |
54 it->second.bookmark_write_count); | 54 it->second.bookmark_write_count); |
55 } | 55 } |
56 } | 56 } |
57 | 57 |
58 namespace { | 58 namespace { |
59 void SetEntrySpecifics(MutableEntry* meta_entry, SyncEntity* sync_entry) { | 59 void SetEntrySpecifics(MutableEntry* meta_entry, SyncEntity* sync_entry) { |
60 // Add the new style extension and the folder bit. | 60 // Add the new style extension and the folder bit. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // the new-style scheme, we should abandon the old way. | 183 // the new-style scheme, we should abandon the old way. |
184 SetOldStyleBookmarkData(&meta_entry, sync_entry); | 184 SetOldStyleBookmarkData(&meta_entry, sync_entry); |
185 } | 185 } |
186 SetEntrySpecifics(&meta_entry, sync_entry); | 186 SetEntrySpecifics(&meta_entry, sync_entry); |
187 } | 187 } |
188 } | 188 } |
189 session->status_controller()->mutable_commit_message()->CopyFrom(message); | 189 session->status_controller()->mutable_commit_message()->CopyFrom(message); |
190 } | 190 } |
191 | 191 |
192 } // namespace browser_sync | 192 } // namespace browser_sync |
OLD | NEW |