| 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" |
| 22 #include "testing/gtest/include/gtest/gtest_prod.h" // For FRIEND_TEST | 23 #include "testing/gtest/include/gtest/gtest_prod.h" // For FRIEND_TEST |
| 23 | 24 |
| 24 namespace syncable { | 25 namespace syncable { |
| 25 class Directory; | 26 class Directory; |
| 26 class DirectoryManager; | 27 class DirectoryManager; |
| 27 class Entry; | 28 class Entry; |
| 28 class Id; | 29 class Id; |
| 29 class MutableEntry; | 30 class MutableEntry; |
| 30 class WriteTransaction; | 31 class WriteTransaction; |
| 31 } // namespace syncable | 32 } // namespace syncable |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 174 |
| 174 scoped_ptr<SyncerEventChannel> syncer_event_channel_; | 175 scoped_ptr<SyncerEventChannel> syncer_event_channel_; |
| 175 scoped_ptr<ShutdownChannel> shutdown_channel_; | 176 scoped_ptr<ShutdownChannel> shutdown_channel_; |
| 176 ClientCommandChannel* command_channel_; | 177 ClientCommandChannel* command_channel_; |
| 177 | 178 |
| 178 // A worker capable of processing work closures on a thread that is | 179 // A worker capable of processing work closures on a thread that is |
| 179 // guaranteed to be safe for model modifications. This is created and owned | 180 // guaranteed to be safe for model modifications. This is created and owned |
| 180 // by the SyncerThread that created us. | 181 // by the SyncerThread that created us. |
| 181 ModelSafeWorker* model_safe_worker_; | 182 ModelSafeWorker* model_safe_worker_; |
| 182 | 183 |
| 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 |
| 183 // The source of the last nudge. | 188 // The source of the last nudge. |
| 184 sync_pb::GetUpdatesCallerInfo::GET_UPDATES_SOURCE updates_source_; | 189 sync_pb::GetUpdatesCallerInfo::GET_UPDATES_SOURCE updates_source_; |
| 185 | 190 |
| 186 // True only if the notification channel is authorized and open. | 191 // True only if the notification channel is authorized and open. |
| 187 bool notifications_enabled_; | 192 bool notifications_enabled_; |
| 188 | 193 |
| 189 // A callback hook used in unittests to simulate changes between conflict set | 194 // A callback hook used in unittests to simulate changes between conflict set |
| 190 // building and conflict resolution. | 195 // building and conflict resolution. |
| 191 TestCallbackFunction pre_conflict_resolution_function_; | 196 TestCallbackFunction pre_conflict_resolution_function_; |
| 192 | 197 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest); | 233 void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest); |
| 229 void ClearServerData(syncable::MutableEntry* entry); | 234 void ClearServerData(syncable::MutableEntry* entry); |
| 230 | 235 |
| 231 // Get update contents as a string. Intended for logging, and intended | 236 // Get update contents as a string. Intended for logging, and intended |
| 232 // to have a smaller footprint than the protobuf's built-in pretty printer. | 237 // to have a smaller footprint than the protobuf's built-in pretty printer. |
| 233 std::string SyncEntityDebugString(const sync_pb::SyncEntity& entry); | 238 std::string SyncEntityDebugString(const sync_pb::SyncEntity& entry); |
| 234 | 239 |
| 235 } // namespace browser_sync | 240 } // namespace browser_sync |
| 236 | 241 |
| 237 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ | 242 #endif // CHROME_BROWSER_SYNC_ENGINE_SYNCER_H_ |
| OLD | NEW |