| OLD | NEW |
| 1 // Copyright (c) 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_JS_SYNC_ENCRYPTION_HANDLER_OBSERVER_H_ | 5 #ifndef SYNC_INTERNAL_API_JS_SYNC_ENCRYPTION_HANDLER_OBSERVER_H_ |
| 6 #define SYNC_INTERNAL_API_JS_SYNC_ENCRYPTION_HANDLER_OBSERVER_H_ | 6 #define SYNC_INTERNAL_API_JS_SYNC_ENCRYPTION_HANDLER_OBSERVER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "sync/base/sync_export.h" |
| 12 #include "sync/internal_api/public/sync_encryption_handler.h" | 13 #include "sync/internal_api/public/sync_encryption_handler.h" |
| 13 #include "sync/internal_api/public/util/weak_handle.h" | 14 #include "sync/internal_api/public/util/weak_handle.h" |
| 14 #include "sync/protocol/sync_protocol_error.h" | 15 #include "sync/protocol/sync_protocol_error.h" |
| 15 | 16 |
| 16 namespace tracked_objects { | 17 namespace tracked_objects { |
| 17 class Location; | 18 class Location; |
| 18 } // namespace tracked_objects | 19 } // namespace tracked_objects |
| 19 | 20 |
| 20 namespace syncer { | 21 namespace syncer { |
| 21 | 22 |
| 22 class JsEventDetails; | 23 class JsEventDetails; |
| 23 class JsEventHandler; | 24 class JsEventHandler; |
| 24 | 25 |
| 25 // Routes SyncEncryptionHandler events to a JsEventHandler. | 26 // Routes SyncEncryptionHandler events to a JsEventHandler. |
| 26 class JsSyncEncryptionHandlerObserver : public SyncEncryptionHandler::Observer { | 27 class SYNC_EXPORT_PRIVATE JsSyncEncryptionHandlerObserver |
| 28 : public SyncEncryptionHandler::Observer { |
| 27 public: | 29 public: |
| 28 JsSyncEncryptionHandlerObserver(); | 30 JsSyncEncryptionHandlerObserver(); |
| 29 virtual ~JsSyncEncryptionHandlerObserver(); | 31 virtual ~JsSyncEncryptionHandlerObserver(); |
| 30 | 32 |
| 31 void SetJsEventHandler(const WeakHandle<JsEventHandler>& event_handler); | 33 void SetJsEventHandler(const WeakHandle<JsEventHandler>& event_handler); |
| 32 | 34 |
| 33 // SyncEncryptionHandlerObserver::Observer implementation. | 35 // SyncEncryptionHandlerObserver::Observer implementation. |
| 34 virtual void OnPassphraseRequired( | 36 virtual void OnPassphraseRequired( |
| 35 PassphraseRequiredReason reason, | 37 PassphraseRequiredReason reason, |
| 36 const sync_pb::EncryptedData& pending_keys) OVERRIDE; | 38 const sync_pb::EncryptedData& pending_keys) OVERRIDE; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 53 const std::string& name, const JsEventDetails& details); | 55 const std::string& name, const JsEventDetails& details); |
| 54 | 56 |
| 55 WeakHandle<JsEventHandler> event_handler_; | 57 WeakHandle<JsEventHandler> event_handler_; |
| 56 | 58 |
| 57 DISALLOW_COPY_AND_ASSIGN(JsSyncEncryptionHandlerObserver); | 59 DISALLOW_COPY_AND_ASSIGN(JsSyncEncryptionHandlerObserver); |
| 58 }; | 60 }; |
| 59 | 61 |
| 60 } // namespace syncer | 62 } // namespace syncer |
| 61 | 63 |
| 62 #endif // SYNC_INTERNAL_API_JS_SYNC_ENCRYPTION_HANDLER_OBSERVER_H_ | 64 #endif // SYNC_INTERNAL_API_JS_SYNC_ENCRYPTION_HANDLER_OBSERVER_H_ |
| OLD | NEW |