OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 5 #ifndef SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 6 #define SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 syncable::BaseTransaction* trans) OVERRIDE; | 164 syncable::BaseTransaction* trans) OVERRIDE; |
165 virtual void HandleCalculateChangesChangeEventFromSyncer( | 165 virtual void HandleCalculateChangesChangeEventFromSyncer( |
166 const syncable::ImmutableWriteTransactionInfo& write_transaction_info, | 166 const syncable::ImmutableWriteTransactionInfo& write_transaction_info, |
167 syncable::BaseTransaction* trans) OVERRIDE; | 167 syncable::BaseTransaction* trans) OVERRIDE; |
168 | 168 |
169 // SyncNotifierObserver implementation. | 169 // SyncNotifierObserver implementation. |
170 virtual void OnNotificationsEnabled() OVERRIDE; | 170 virtual void OnNotificationsEnabled() OVERRIDE; |
171 virtual void OnNotificationsDisabled( | 171 virtual void OnNotificationsDisabled( |
172 NotificationsDisabledReason reason) OVERRIDE; | 172 NotificationsDisabledReason reason) OVERRIDE; |
173 virtual void OnIncomingNotification( | 173 virtual void OnIncomingNotification( |
174 const ObjectIdPayloadMap& id_payloads, | 174 const ObjectIdStateMap& id_state_map, |
175 IncomingNotificationSource source) OVERRIDE; | 175 IncomingNotificationSource source) OVERRIDE; |
176 | 176 |
177 // Called only by our NetworkChangeNotifier. | 177 // Called only by our NetworkChangeNotifier. |
178 virtual void OnIPAddressChanged() OVERRIDE; | 178 virtual void OnIPAddressChanged() OVERRIDE; |
179 | 179 |
180 const SyncScheduler* scheduler() const; | 180 const SyncScheduler* scheduler() const; |
181 | 181 |
182 private: | 182 private: |
183 friend class SyncManagerTest; | 183 friend class SyncManagerTest; |
184 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, NudgeDelayTest); | 184 FRIEND_TEST_ALL_PREFIXES(SyncManagerTest, NudgeDelayTest); |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 248 |
249 // Internal callback used by GetSessionName. | 249 // Internal callback used by GetSessionName. |
250 // TODO(rlarocque): not currently called from anywhere. This should be | 250 // TODO(rlarocque): not currently called from anywhere. This should be |
251 // hooked up to something once we start preserving device information again. | 251 // hooked up to something once we start preserving device information again. |
252 void UpdateSessionNameCallback(const std::string& chrome_version, | 252 void UpdateSessionNameCallback(const std::string& chrome_version, |
253 const std::string& session_name); | 253 const std::string& session_name); |
254 | 254 |
255 // Called for every notification. This updates the notification statistics | 255 // Called for every notification. This updates the notification statistics |
256 // to be displayed in about:sync. | 256 // to be displayed in about:sync. |
257 void UpdateNotificationInfo( | 257 void UpdateNotificationInfo( |
258 const ModelTypePayloadMap& type_payloads); | 258 const ModelTypeStateMap& type_state_map); |
259 | 259 |
260 // Checks for server reachabilty and requests a nudge. | 260 // Checks for server reachabilty and requests a nudge. |
261 void OnIPAddressChangedImpl(); | 261 void OnIPAddressChangedImpl(); |
262 | 262 |
263 // Helper function used only by the constructor. | 263 // Helper function used only by the constructor. |
264 void BindJsMessageHandler( | 264 void BindJsMessageHandler( |
265 const std::string& name, UnboundJsMessageHandler unbound_message_handler); | 265 const std::string& name, UnboundJsMessageHandler unbound_message_handler); |
266 | 266 |
267 // Helper function used by OnNotifications{Enabled,Disabled}(). | 267 // Helper function used by OnNotifications{Enabled,Disabled}(). |
268 void OnNotificationStateChange(NotificationsDisabledReason reason); | 268 void OnNotificationStateChange(NotificationsDisabledReason reason); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 // changing passphrases, and in general handles sync-specific interactions | 381 // changing passphrases, and in general handles sync-specific interactions |
382 // with the cryptographer. | 382 // with the cryptographer. |
383 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; | 383 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; |
384 | 384 |
385 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 385 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); |
386 }; | 386 }; |
387 | 387 |
388 } // namespace syncer | 388 } // namespace syncer |
389 | 389 |
390 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 390 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
OLD | NEW |