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_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" |
(...skipping 17 matching lines...) Expand all Loading... |
28 : public SyncEncryptionHandler::Observer { | 28 : public SyncEncryptionHandler::Observer { |
29 public: | 29 public: |
30 JsSyncEncryptionHandlerObserver(); | 30 JsSyncEncryptionHandlerObserver(); |
31 virtual ~JsSyncEncryptionHandlerObserver(); | 31 virtual ~JsSyncEncryptionHandlerObserver(); |
32 | 32 |
33 void SetJsEventHandler(const WeakHandle<JsEventHandler>& event_handler); | 33 void SetJsEventHandler(const WeakHandle<JsEventHandler>& event_handler); |
34 | 34 |
35 // SyncEncryptionHandlerObserver::Observer implementation. | 35 // SyncEncryptionHandlerObserver::Observer implementation. |
36 virtual void OnPassphraseRequired( | 36 virtual void OnPassphraseRequired( |
37 PassphraseRequiredReason reason, | 37 PassphraseRequiredReason reason, |
38 const sync_pb::EncryptedData& pending_keys) OVERRIDE; | 38 const sync_pb::EncryptedData& pending_keys) override; |
39 virtual void OnPassphraseAccepted() OVERRIDE; | 39 virtual void OnPassphraseAccepted() override; |
40 virtual void OnBootstrapTokenUpdated( | 40 virtual void OnBootstrapTokenUpdated( |
41 const std::string& bootstrap_token, | 41 const std::string& bootstrap_token, |
42 BootstrapTokenType type) OVERRIDE; | 42 BootstrapTokenType type) override; |
43 virtual void OnEncryptedTypesChanged( | 43 virtual void OnEncryptedTypesChanged( |
44 ModelTypeSet encrypted_types, | 44 ModelTypeSet encrypted_types, |
45 bool encrypt_everything) OVERRIDE; | 45 bool encrypt_everything) override; |
46 virtual void OnEncryptionComplete() OVERRIDE; | 46 virtual void OnEncryptionComplete() override; |
47 virtual void OnCryptographerStateChanged( | 47 virtual void OnCryptographerStateChanged( |
48 Cryptographer* cryptographer) OVERRIDE; | 48 Cryptographer* cryptographer) override; |
49 virtual void OnPassphraseTypeChanged( | 49 virtual void OnPassphraseTypeChanged( |
50 PassphraseType type, | 50 PassphraseType type, |
51 base::Time explicit_passphrase_time) OVERRIDE; | 51 base::Time explicit_passphrase_time) override; |
52 | 52 |
53 private: | 53 private: |
54 void HandleJsEvent(const tracked_objects::Location& from_here, | 54 void HandleJsEvent(const tracked_objects::Location& from_here, |
55 const std::string& name, const JsEventDetails& details); | 55 const std::string& name, const JsEventDetails& details); |
56 | 56 |
57 WeakHandle<JsEventHandler> event_handler_; | 57 WeakHandle<JsEventHandler> event_handler_; |
58 | 58 |
59 DISALLOW_COPY_AND_ASSIGN(JsSyncEncryptionHandlerObserver); | 59 DISALLOW_COPY_AND_ASSIGN(JsSyncEncryptionHandlerObserver); |
60 }; | 60 }; |
61 | 61 |
62 } // namespace syncer | 62 } // namespace syncer |
63 | 63 |
64 #endif // SYNC_INTERNAL_API_JS_SYNC_ENCRYPTION_HANDLER_OBSERVER_H_ | 64 #endif // SYNC_INTERNAL_API_JS_SYNC_ENCRYPTION_HANDLER_OBSERVER_H_ |
OLD | NEW |