| Index: sync/internal_api/js_sync_encryption_handler_observer.h
|
| diff --git a/sync/internal_api/js_sync_manager_observer.h b/sync/internal_api/js_sync_encryption_handler_observer.h
|
| similarity index 54%
|
| copy from sync/internal_api/js_sync_manager_observer.h
|
| copy to sync/internal_api/js_sync_encryption_handler_observer.h
|
| index 8d0622cc0d063c04addd0040268e77d6c2bba92b..4562e5ffb5eaad19f1c8a28b94136f9cf7c7be61 100644
|
| --- a/sync/internal_api/js_sync_manager_observer.h
|
| +++ b/sync/internal_api/js_sync_encryption_handler_observer.h
|
| @@ -2,14 +2,14 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#ifndef SYNC_INTERNAL_API_JS_SYNC_MANAGER_OBSERVER_H_
|
| -#define SYNC_INTERNAL_API_JS_SYNC_MANAGER_OBSERVER_H_
|
| +#ifndef SYNC_INTERNAL_API_JS_SYNC_ENCRYPTION_HANDLER_OBSERVER_H_
|
| +#define SYNC_INTERNAL_API_JS_SYNC_ENCRYPTION_HANDLER_OBSERVER_H_
|
|
|
| #include <string>
|
|
|
| #include "base/basictypes.h"
|
| #include "base/compiler_specific.h"
|
| -#include "sync/internal_api/public/sync_manager.h"
|
| +#include "sync/internal_api/public/sync_encryption_handler.h"
|
| #include "sync/internal_api/public/util/weak_handle.h"
|
| #include "sync/protocol/sync_protocol_error.h"
|
|
|
| @@ -22,19 +22,15 @@ namespace syncer {
|
| class JsEventDetails;
|
| class JsEventHandler;
|
|
|
| -// Routes SyncManager events to a JsEventHandler.
|
| -class JsSyncManagerObserver : public SyncManager::Observer {
|
| +// Routes SyncEncryptionHandler events to a JsEventHandler.
|
| +class JsSyncEncryptionHandlerObserver : public SyncEncryptionHandler::Observer {
|
| public:
|
| - JsSyncManagerObserver();
|
| - virtual ~JsSyncManagerObserver();
|
| + JsSyncEncryptionHandlerObserver();
|
| + virtual ~JsSyncEncryptionHandlerObserver();
|
|
|
| void SetJsEventHandler(const WeakHandle<JsEventHandler>& event_handler);
|
|
|
| - // SyncManager::Observer implementation.
|
| - virtual void OnSyncCycleCompleted(
|
| - const sessions::SyncSessionSnapshot& snapshot) OVERRIDE;
|
| - virtual void OnConnectionStatusChange(ConnectionStatus status) OVERRIDE;
|
| - virtual void OnUpdatedToken(const std::string& token) OVERRIDE;
|
| + // SyncEncryptionHandlerObserver::Observer implementation.
|
| virtual void OnPassphraseRequired(
|
| PassphraseRequiredReason reason,
|
| const sync_pb::EncryptedData& pending_keys) OVERRIDE;
|
| @@ -45,12 +41,8 @@ class JsSyncManagerObserver : public SyncManager::Observer {
|
| ModelTypeSet encrypted_types,
|
| bool encrypt_everything) OVERRIDE;
|
| virtual void OnEncryptionComplete() OVERRIDE;
|
| - virtual void OnInitializationComplete(
|
| - const WeakHandle<JsBackend>& js_backend, bool success,
|
| - syncer::ModelTypeSet restored_types) OVERRIDE;
|
| - virtual void OnStopSyncingPermanently() OVERRIDE;
|
| - virtual void OnActionableError(
|
| - const SyncProtocolError& sync_protocol_error) OVERRIDE;
|
| + virtual void OnCryptographerStateChanged(
|
| + Cryptographer* cryptographer) OVERRIDE;
|
|
|
| private:
|
| void HandleJsEvent(const tracked_objects::Location& from_here,
|
| @@ -58,9 +50,9 @@ class JsSyncManagerObserver : public SyncManager::Observer {
|
|
|
| WeakHandle<JsEventHandler> event_handler_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(JsSyncManagerObserver);
|
| + DISALLOW_COPY_AND_ASSIGN(JsSyncEncryptionHandlerObserver);
|
| };
|
|
|
| } // namespace syncer
|
|
|
| -#endif // SYNC_INTERNAL_API_JS_SYNC_MANAGER_OBSERVER_H_
|
| +#endif // SYNC_INTERNAL_API_JS_SYNC_ENCRYPTION_HANDLER_OBSERVER_H_
|
|
|