Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Side by Side Diff: sync/internal_api/sync_manager_impl.h

Issue 212603007: sync: Buffer Protocol Events for about:sync page (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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" 16 #include "sync/engine/traffic_recorder.h"
17 #include "sync/internal_api/change_reorder_buffer.h" 17 #include "sync/internal_api/change_reorder_buffer.h"
18 #include "sync/internal_api/debug_info_event_listener.h" 18 #include "sync/internal_api/debug_info_event_listener.h"
19 #include "sync/internal_api/js_mutation_event_observer.h" 19 #include "sync/internal_api/js_mutation_event_observer.h"
20 #include "sync/internal_api/js_sync_encryption_handler_observer.h" 20 #include "sync/internal_api/js_sync_encryption_handler_observer.h"
21 #include "sync/internal_api/js_sync_manager_observer.h" 21 #include "sync/internal_api/js_sync_manager_observer.h"
22 #include "sync/internal_api/protocol_event_buffer.h"
22 #include "sync/internal_api/public/sync_manager.h" 23 #include "sync/internal_api/public/sync_manager.h"
23 #include "sync/internal_api/public/user_share.h" 24 #include "sync/internal_api/public/user_share.h"
24 #include "sync/internal_api/sync_encryption_handler_impl.h" 25 #include "sync/internal_api/sync_encryption_handler_impl.h"
25 #include "sync/js/js_backend.h" 26 #include "sync/js/js_backend.h"
26 #include "sync/notifier/invalidation_handler.h" 27 #include "sync/notifier/invalidation_handler.h"
27 #include "sync/notifier/invalidator_state.h" 28 #include "sync/notifier/invalidator_state.h"
28 #include "sync/syncable/directory_change_delegate.h" 29 #include "sync/syncable/directory_change_delegate.h"
29 #include "sync/util/cryptographer.h" 30 #include "sync/util/cryptographer.h"
30 #include "sync/util/time.h" 31 #include "sync/util/time.h"
31 32
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 virtual void AddObserver(SyncManager::Observer* observer) OVERRIDE; 108 virtual void AddObserver(SyncManager::Observer* observer) OVERRIDE;
108 virtual void RemoveObserver(SyncManager::Observer* observer) OVERRIDE; 109 virtual void RemoveObserver(SyncManager::Observer* observer) OVERRIDE;
109 virtual SyncStatus GetDetailedStatus() const OVERRIDE; 110 virtual SyncStatus GetDetailedStatus() const OVERRIDE;
110 virtual void SaveChanges() OVERRIDE; 111 virtual void SaveChanges() OVERRIDE;
111 virtual void ShutdownOnSyncThread() OVERRIDE; 112 virtual void ShutdownOnSyncThread() OVERRIDE;
112 virtual UserShare* GetUserShare() OVERRIDE; 113 virtual UserShare* GetUserShare() OVERRIDE;
113 virtual const std::string cache_guid() OVERRIDE; 114 virtual const std::string cache_guid() OVERRIDE;
114 virtual bool ReceivedExperiment(Experiments* experiments) OVERRIDE; 115 virtual bool ReceivedExperiment(Experiments* experiments) OVERRIDE;
115 virtual bool HasUnsyncedItems() OVERRIDE; 116 virtual bool HasUnsyncedItems() OVERRIDE;
116 virtual SyncEncryptionHandler* GetEncryptionHandler() OVERRIDE; 117 virtual SyncEncryptionHandler* GetEncryptionHandler() OVERRIDE;
118 virtual ScopedVector<syncer::ProtocolEvent>
119 GetBufferedProtocolEvents() OVERRIDE;
117 120
118 // SyncEncryptionHandler::Observer implementation. 121 // SyncEncryptionHandler::Observer implementation.
119 virtual void OnPassphraseRequired( 122 virtual void OnPassphraseRequired(
120 PassphraseRequiredReason reason, 123 PassphraseRequiredReason reason,
121 const sync_pb::EncryptedData& pending_keys) OVERRIDE; 124 const sync_pb::EncryptedData& pending_keys) OVERRIDE;
122 virtual void OnPassphraseAccepted() OVERRIDE; 125 virtual void OnPassphraseAccepted() OVERRIDE;
123 virtual void OnBootstrapTokenUpdated( 126 virtual void OnBootstrapTokenUpdated(
124 const std::string& bootstrap_token, 127 const std::string& bootstrap_token,
125 BootstrapTokenType type) OVERRIDE; 128 BootstrapTokenType type) OVERRIDE;
126 virtual void OnEncryptedTypesChanged( 129 virtual void OnEncryptedTypesChanged(
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 350
348 // These are for interacting with chrome://sync-internals. 351 // These are for interacting with chrome://sync-internals.
349 JsMessageHandlerMap js_message_handlers_; 352 JsMessageHandlerMap js_message_handlers_;
350 JsSyncManagerObserver js_sync_manager_observer_; 353 JsSyncManagerObserver js_sync_manager_observer_;
351 JsMutationEventObserver js_mutation_event_observer_; 354 JsMutationEventObserver js_mutation_event_observer_;
352 JsSyncEncryptionHandlerObserver js_sync_encryption_handler_observer_; 355 JsSyncEncryptionHandlerObserver js_sync_encryption_handler_observer_;
353 356
354 // This is for keeping track of client events to send to the server. 357 // This is for keeping track of client events to send to the server.
355 DebugInfoEventListener debug_info_event_listener_; 358 DebugInfoEventListener debug_info_event_listener_;
356 359
360 ProtocolEventBuffer protocol_event_buffer_;
357 TrafficRecorder traffic_recorder_; 361 TrafficRecorder traffic_recorder_;
358 362
359 Encryptor* encryptor_; 363 Encryptor* encryptor_;
360 scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler_; 364 scoped_ptr<UnrecoverableErrorHandler> unrecoverable_error_handler_;
361 ReportUnrecoverableErrorFunction report_unrecoverable_error_function_; 365 ReportUnrecoverableErrorFunction report_unrecoverable_error_function_;
362 366
363 // Sync's encryption handler. It tracks the set of encrypted types, manages 367 // Sync's encryption handler. It tracks the set of encrypted types, manages
364 // changing passphrases, and in general handles sync-specific interactions 368 // changing passphrases, and in general handles sync-specific interactions
365 // with the cryptographer. 369 // with the cryptographer.
366 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_; 370 scoped_ptr<SyncEncryptionHandlerImpl> sync_encryption_handler_;
367 371
368 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_; 372 base::WeakPtrFactory<SyncManagerImpl> weak_ptr_factory_;
369 373
370 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl); 374 DISALLOW_COPY_AND_ASSIGN(SyncManagerImpl);
371 }; 375 };
372 376
373 } // namespace syncer 377 } // namespace syncer
374 378
375 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_ 379 #endif // SYNC_INTERNAL_API_SYNC_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698