OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 entry. | 3 // found in the LICENSE entry. |
4 | 4 |
5 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ |
6 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ | 6 #define CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
14 #include "base/time.h" | 14 #include "base/time.h" |
15 #include "chrome/browser/sync/engine/client_command_channel.h" | 15 #include "chrome/browser/sync/engine/client_command_channel.h" |
16 #include "chrome/browser/sync/engine/conflict_resolver.h" | 16 #include "chrome/browser/sync/engine/conflict_resolver.h" |
17 #include "chrome/browser/sync/engine/syncer_types.h" | 17 #include "chrome/browser/sync/engine/syncer_types.h" |
18 #include "chrome/browser/sync/engine/syncproto.h" | 18 #include "chrome/browser/sync/engine/syncproto.h" |
19 #include "chrome/browser/sync/syncable/directory_event.h" | 19 #include "chrome/browser/sync/syncable/directory_event.h" |
20 #include "chrome/browser/sync/util/event_sys-inl.h" | 20 #include "chrome/browser/sync/util/event_sys-inl.h" |
21 #include "chrome/browser/sync/util/event_sys.h" | 21 #include "chrome/browser/sync/util/event_sys.h" |
22 #include "chrome/browser/sync/util/extensions_activity_monitor.h" | |
23 #include "testing/gtest/include/gtest/gtest_prod.h" // For FRIEND_TEST | 22 #include "testing/gtest/include/gtest/gtest_prod.h" // For FRIEND_TEST |
24 | 23 |
25 namespace syncable { | 24 namespace syncable { |
26 class Directory; | 25 class Directory; |
27 class DirectoryManager; | 26 class DirectoryManager; |
28 class Entry; | 27 class Entry; |
29 class Id; | 28 class Id; |
30 class MutableEntry; | 29 class MutableEntry; |
31 class WriteTransaction; | 30 class WriteTransaction; |
32 } // namespace syncable | 31 } // namespace syncable |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 | 173 |
175 scoped_ptr<SyncerEventChannel> syncer_event_channel_; | 174 scoped_ptr<SyncerEventChannel> syncer_event_channel_; |
176 scoped_ptr<ShutdownChannel> shutdown_channel_; | 175 scoped_ptr<ShutdownChannel> shutdown_channel_; |
177 ClientCommandChannel* command_channel_; | 176 ClientCommandChannel* command_channel_; |
178 | 177 |
179 // A worker capable of processing work closures on a thread that is | 178 // A worker capable of processing work closures on a thread that is |
180 // guaranteed to be safe for model modifications. This is created and owned | 179 // guaranteed to be safe for model modifications. This is created and owned |
181 // by the SyncerThread that created us. | 180 // by the SyncerThread that created us. |
182 ModelSafeWorker* model_safe_worker_; | 181 ModelSafeWorker* model_safe_worker_; |
183 | 182 |
184 // We use this to stuff extensions activity into CommitMessages so the server | |
185 // can correlate commit traffic with extension-related bookmark mutations. | |
186 ExtensionsActivityMonitor* extensions_monitor_; | |
187 | |
188 // The source of the last nudge. | 183 // The source of the last nudge. |
189 sync_pb::GetUpdatesCallerInfo::GET_UPDATES_SOURCE updates_source_; | 184 sync_pb::GetUpdatesCallerInfo::GET_UPDATES_SOURCE updates_source_; |
190 | 185 |
191 // True only if the notification channel is authorized and open. | 186 // True only if the notification channel is authorized and open. |
192 bool notifications_enabled_; | 187 bool notifications_enabled_; |
193 | 188 |
194 // A callback hook used in unittests to simulate changes between conflict set | 189 // A callback hook used in unittests to simulate changes between conflict set |
195 // building and conflict resolution. | 190 // building and conflict resolution. |
196 TestCallbackFunction pre_conflict_resolution_function_; | 191 TestCallbackFunction pre_conflict_resolution_function_; |
197 | 192 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest); | 228 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest); |
234 void ClearServerData(syncable::MutableEntry* entry); | 229 void ClearServerData(syncable::MutableEntry* entry); |
235 | 230 |
236 // Get update contents as a string. Intended for logging, and intended | 231 // Get update contents as a string. Intended for logging, and intended |
237 // to have a smaller footprint than the protobuf's built-in pretty printer. | 232 // to have a smaller footprint than the protobuf's built-in pretty printer. |
238 std::string SyncEntityDebugString(const sync_pb::SyncEntity& entry); | 233 std::string SyncEntityDebugString(const sync_pb::SyncEntity& entry); |
239 | 234 |
240 } // namespace browser_sync | 235 } // namespace browser_sync |
241 | 236 |
242 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ | 237 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ |
OLD | NEW |