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_DEBUG_INFO_EVENT_LISTENER_H_ | 5 #ifndef SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_ |
6 #define SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_ | 6 #define SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 : public SyncManager::Observer, | 34 : public SyncManager::Observer, |
35 public SyncEncryptionHandler::Observer, | 35 public SyncEncryptionHandler::Observer, |
36 public sessions::DebugInfoGetter, | 36 public sessions::DebugInfoGetter, |
37 public DataTypeDebugInfoListener { | 37 public DataTypeDebugInfoListener { |
38 public: | 38 public: |
39 DebugInfoEventListener(); | 39 DebugInfoEventListener(); |
40 virtual ~DebugInfoEventListener(); | 40 virtual ~DebugInfoEventListener(); |
41 | 41 |
42 // SyncManager::Observer implementation. | 42 // SyncManager::Observer implementation. |
43 virtual void OnSyncCycleCompleted( | 43 virtual void OnSyncCycleCompleted( |
44 const sessions::SyncSessionSnapshot& snapshot) OVERRIDE; | 44 const sessions::SyncSessionSnapshot& snapshot) override; |
45 virtual void OnInitializationComplete( | 45 virtual void OnInitializationComplete( |
46 const WeakHandle<JsBackend>& js_backend, | 46 const WeakHandle<JsBackend>& js_backend, |
47 const WeakHandle<DataTypeDebugInfoListener>& debug_listener, | 47 const WeakHandle<DataTypeDebugInfoListener>& debug_listener, |
48 bool success, ModelTypeSet restored_types) OVERRIDE; | 48 bool success, ModelTypeSet restored_types) override; |
49 virtual void OnConnectionStatusChange( | 49 virtual void OnConnectionStatusChange( |
50 ConnectionStatus connection_status) OVERRIDE; | 50 ConnectionStatus connection_status) override; |
51 virtual void OnActionableError( | 51 virtual void OnActionableError( |
52 const SyncProtocolError& sync_error) OVERRIDE; | 52 const SyncProtocolError& sync_error) override; |
53 virtual void OnMigrationRequested(ModelTypeSet types) OVERRIDE; | 53 virtual void OnMigrationRequested(ModelTypeSet types) override; |
54 virtual void OnProtocolEvent(const ProtocolEvent& event) OVERRIDE; | 54 virtual void OnProtocolEvent(const ProtocolEvent& event) override; |
55 | 55 |
56 // SyncEncryptionHandler::Observer implementation. | 56 // SyncEncryptionHandler::Observer implementation. |
57 virtual void OnPassphraseRequired( | 57 virtual void OnPassphraseRequired( |
58 PassphraseRequiredReason reason, | 58 PassphraseRequiredReason reason, |
59 const sync_pb::EncryptedData& pending_keys) OVERRIDE; | 59 const sync_pb::EncryptedData& pending_keys) override; |
60 virtual void OnPassphraseAccepted() OVERRIDE; | 60 virtual void OnPassphraseAccepted() override; |
61 virtual void OnBootstrapTokenUpdated( | 61 virtual void OnBootstrapTokenUpdated( |
62 const std::string& bootstrap_token, | 62 const std::string& bootstrap_token, |
63 BootstrapTokenType type) OVERRIDE; | 63 BootstrapTokenType type) override; |
64 virtual void OnEncryptedTypesChanged( | 64 virtual void OnEncryptedTypesChanged( |
65 ModelTypeSet encrypted_types, | 65 ModelTypeSet encrypted_types, |
66 bool encrypt_everything) OVERRIDE; | 66 bool encrypt_everything) override; |
67 virtual void OnEncryptionComplete() OVERRIDE; | 67 virtual void OnEncryptionComplete() override; |
68 virtual void OnCryptographerStateChanged( | 68 virtual void OnCryptographerStateChanged( |
69 Cryptographer* cryptographer) OVERRIDE; | 69 Cryptographer* cryptographer) override; |
70 virtual void OnPassphraseTypeChanged( | 70 virtual void OnPassphraseTypeChanged( |
71 PassphraseType type, | 71 PassphraseType type, |
72 base::Time explicit_passphrase_time) OVERRIDE; | 72 base::Time explicit_passphrase_time) override; |
73 | 73 |
74 // Sync manager events. | 74 // Sync manager events. |
75 void OnNudgeFromDatatype(ModelType datatype); | 75 void OnNudgeFromDatatype(ModelType datatype); |
76 | 76 |
77 // DebugInfoGetter implementation. | 77 // DebugInfoGetter implementation. |
78 virtual void GetDebugInfo(sync_pb::DebugInfo* debug_info) OVERRIDE; | 78 virtual void GetDebugInfo(sync_pb::DebugInfo* debug_info) override; |
79 | 79 |
80 // DebugInfoGetter implementation. | 80 // DebugInfoGetter implementation. |
81 virtual void ClearDebugInfo() OVERRIDE; | 81 virtual void ClearDebugInfo() override; |
82 | 82 |
83 // DataTypeDebugInfoListener implementation. | 83 // DataTypeDebugInfoListener implementation. |
84 virtual void OnDataTypeConfigureComplete( | 84 virtual void OnDataTypeConfigureComplete( |
85 const std::vector<DataTypeConfigurationStats>& configuration_stats) | 85 const std::vector<DataTypeConfigurationStats>& configuration_stats) |
86 OVERRIDE; | 86 override; |
87 | 87 |
88 // Returns a weak pointer to this object. | 88 // Returns a weak pointer to this object. |
89 base::WeakPtr<DataTypeDebugInfoListener> GetWeakPtr(); | 89 base::WeakPtr<DataTypeDebugInfoListener> GetWeakPtr(); |
90 | 90 |
91 private: | 91 private: |
92 FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyEventsAdded); | 92 FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyEventsAdded); |
93 FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyQueueSize); | 93 FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyQueueSize); |
94 FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyGetEvents); | 94 FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyGetEvents); |
95 FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyClearEvents); | 95 FRIEND_TEST_ALL_PREFIXES(DebugInfoEventListenerTest, VerifyClearEvents); |
96 | 96 |
(...skipping 16 matching lines...) Expand all Loading... |
113 base::ThreadChecker thread_checker_; | 113 base::ThreadChecker thread_checker_; |
114 | 114 |
115 base::WeakPtrFactory<DebugInfoEventListener> weak_ptr_factory_; | 115 base::WeakPtrFactory<DebugInfoEventListener> weak_ptr_factory_; |
116 | 116 |
117 DISALLOW_COPY_AND_ASSIGN(DebugInfoEventListener); | 117 DISALLOW_COPY_AND_ASSIGN(DebugInfoEventListener); |
118 }; | 118 }; |
119 | 119 |
120 } // namespace syncer | 120 } // namespace syncer |
121 | 121 |
122 #endif // SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_ | 122 #endif // SYNC_INTERNAL_API_DEBUG_INFO_EVENT_LISTENER_H_ |
OLD | NEW |