| 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 #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 |
| 11 #include "net/base/network_change_notifier.h" | 11 #include "net/base/network_change_notifier.h" |
| 12 #include "sync/base/sync_export.h" | 12 #include "sync/base/sync_export.h" |
| 13 #include "sync/engine/all_status.h" | 13 #include "sync/engine/all_status.h" |
| 14 #include "sync/engine/net/server_connection_manager.h" | 14 #include "sync/engine/net/server_connection_manager.h" |
| 15 #include "sync/engine/sync_engine_event_listener.h" | 15 #include "sync/engine/sync_engine_event_listener.h" |
| 16 #include "sync/engine/traffic_recorder.h" | |
| 17 #include "sync/internal_api/change_reorder_buffer.h" | 16 #include "sync/internal_api/change_reorder_buffer.h" |
| 18 #include "sync/internal_api/debug_info_event_listener.h" | 17 #include "sync/internal_api/debug_info_event_listener.h" |
| 19 #include "sync/internal_api/js_mutation_event_observer.h" | 18 #include "sync/internal_api/js_mutation_event_observer.h" |
| 20 #include "sync/internal_api/js_sync_encryption_handler_observer.h" | 19 #include "sync/internal_api/js_sync_encryption_handler_observer.h" |
| 21 #include "sync/internal_api/js_sync_manager_observer.h" | 20 #include "sync/internal_api/js_sync_manager_observer.h" |
| 22 #include "sync/internal_api/protocol_event_buffer.h" | 21 #include "sync/internal_api/protocol_event_buffer.h" |
| 23 #include "sync/internal_api/public/sync_manager.h" | 22 #include "sync/internal_api/public/sync_manager.h" |
| 24 #include "sync/internal_api/public/user_share.h" | 23 #include "sync/internal_api/public/user_share.h" |
| 25 #include "sync/internal_api/sync_encryption_handler_impl.h" | 24 #include "sync/internal_api/sync_encryption_handler_impl.h" |
| 26 #include "sync/js/js_backend.h" | 25 #include "sync/js/js_backend.h" |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 | 268 |
| 270 // Helper function used only by the constructor. | 269 // Helper function used only by the constructor. |
| 271 void BindJsMessageHandler( | 270 void BindJsMessageHandler( |
| 272 const std::string& name, UnboundJsMessageHandler unbound_message_handler); | 271 const std::string& name, UnboundJsMessageHandler unbound_message_handler); |
| 273 | 272 |
| 274 // JS message handlers. | 273 // JS message handlers. |
| 275 JsArgList GetAllNodes(const JsArgList& args); | 274 JsArgList GetAllNodes(const JsArgList& args); |
| 276 JsArgList GetNodeSummariesById(const JsArgList& args); | 275 JsArgList GetNodeSummariesById(const JsArgList& args); |
| 277 JsArgList GetNodeDetailsById(const JsArgList& args); | 276 JsArgList GetNodeDetailsById(const JsArgList& args); |
| 278 JsArgList GetChildNodeIds(const JsArgList& args); | 277 JsArgList GetChildNodeIds(const JsArgList& args); |
| 279 JsArgList GetClientServerTraffic(const JsArgList& args); | |
| 280 | 278 |
| 281 syncable::Directory* directory(); | 279 syncable::Directory* directory(); |
| 282 | 280 |
| 283 base::FilePath database_path_; | 281 base::FilePath database_path_; |
| 284 | 282 |
| 285 const std::string name_; | 283 const std::string name_; |
| 286 | 284 |
| 287 base::ThreadChecker thread_checker_; | 285 base::ThreadChecker thread_checker_; |
| 288 | 286 |
| 289 // Thread-safe handle used by | 287 // Thread-safe handle used by |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 // These are for interacting with chrome://sync-internals. | 353 // These are for interacting with chrome://sync-internals. |
| 356 JsMessageHandlerMap js_message_handlers_; | 354 JsMessageHandlerMap js_message_handlers_; |
| 357 JsSyncManagerObserver js_sync_manager_observer_; | 355 JsSyncManagerObserver js_sync_manager_observer_; |
| 358 JsMutationEventObserver js_mutation_event_observer_; | 356 JsMutationEventObserver js_mutation_event_observer_; |
| 359 JsSyncEncryptionHandlerObserver js_sync_encryption_handler_observer_; | 357 JsSyncEncryptionHandlerObserver js_sync_encryption_handler_observer_; |
| 360 | 358 |
| 361 // This is for keeping track of client events to send to the server. | 359 // This is for keeping track of client events to send to the server. |
| 362 DebugInfoEventListener debug_info_event_listener_; | 360 DebugInfoEventListener debug_info_event_listener_; |
| 363 | 361 |
| 364 ProtocolEventBuffer protocol_event_buffer_; | 362 ProtocolEventBuffer protocol_event_buffer_; |
| 365 TrafficRecorder traffic_recorder_; | |
| 366 | 363 |
| 367 Encryptor* encryptor_; | 364 Encryptor* encryptor_; |
| 368 scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler_; | 365 scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler_; |
| 369 ReportUnrecoverableErrorFunction report_unrecoverable_error_function_; | 366 ReportUnrecoverableErrorFunction report_unrecoverable_error_function_; |
| 370 | 367 |
| 371 // Sync's encryption handler. It tracks the set of encrypted types, manages | 368 // Sync's encryption handler. It tracks the set of encrypted types, manages |
| 372 // changing passphrases, and in general handles sync-specific interactions | 369 // changing passphrases, and in general handles sync-specific interactions |
| 373 // with the cryptographer. | 370 // with the cryptographer. |
| 374 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; | 371 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; |
| 375 | 372 |
| 376 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; | 373 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; |
| 377 | 374 |
| 378 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); | 375 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); |
| 379 }; | 376 }; |
| 380 | 377 |
| 381 } // namespace syncer | 378 } // namespace syncer |
| 382 | 379 |
| 383 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ | 380 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ |
| OLD | NEW |