OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_CORE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_CORE_H_ |
6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_CORE_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_CORE_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 | 9 |
10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 public: | 84 public: |
85 SyncBackendHostCore(const std::string& name, | 85 SyncBackendHostCore(const std::string& name, |
86 const base::FilePath& sync_data_folder_path, | 86 const base::FilePath& sync_data_folder_path, |
87 bool has_sync_setup_completed, | 87 bool has_sync_setup_completed, |
88 const base::WeakPtr<SyncBackendHostImpl>& backend); | 88 const base::WeakPtr<SyncBackendHostImpl>& backend); |
89 | 89 |
90 // SyncManager::Observer implementation. The Core just acts like an air | 90 // SyncManager::Observer implementation. The Core just acts like an air |
91 // traffic controller here, forwarding incoming messages to appropriate | 91 // traffic controller here, forwarding incoming messages to appropriate |
92 // landing threads. | 92 // landing threads. |
93 virtual void OnSyncCycleCompleted( | 93 virtual void OnSyncCycleCompleted( |
94 const syncer::sessions::SyncSessionSnapshot& snapshot) OVERRIDE; | 94 const syncer::sessions::SyncSessionSnapshot& snapshot) override; |
95 virtual void OnInitializationComplete( | 95 virtual void OnInitializationComplete( |
96 const syncer::WeakHandle<syncer::JsBackend>& js_backend, | 96 const syncer::WeakHandle<syncer::JsBackend>& js_backend, |
97 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& | 97 const syncer::WeakHandle<syncer::DataTypeDebugInfoListener>& |
98 debug_info_listener, | 98 debug_info_listener, |
99 bool success, | 99 bool success, |
100 syncer::ModelTypeSet restored_types) OVERRIDE; | 100 syncer::ModelTypeSet restored_types) override; |
101 virtual void OnConnectionStatusChange( | 101 virtual void OnConnectionStatusChange( |
102 syncer::ConnectionStatus status) OVERRIDE; | 102 syncer::ConnectionStatus status) override; |
103 virtual void OnActionableError( | 103 virtual void OnActionableError( |
104 const syncer::SyncProtocolError& sync_error) OVERRIDE; | 104 const syncer::SyncProtocolError& sync_error) override; |
105 virtual void OnMigrationRequested(syncer::ModelTypeSet types) OVERRIDE; | 105 virtual void OnMigrationRequested(syncer::ModelTypeSet types) override; |
106 virtual void OnProtocolEvent(const syncer::ProtocolEvent& event) OVERRIDE; | 106 virtual void OnProtocolEvent(const syncer::ProtocolEvent& event) override; |
107 | 107 |
108 // SyncEncryptionHandler::Observer implementation. | 108 // SyncEncryptionHandler::Observer implementation. |
109 virtual void OnPassphraseRequired( | 109 virtual void OnPassphraseRequired( |
110 syncer::PassphraseRequiredReason reason, | 110 syncer::PassphraseRequiredReason reason, |
111 const sync_pb::EncryptedData& pending_keys) OVERRIDE; | 111 const sync_pb::EncryptedData& pending_keys) override; |
112 virtual void OnPassphraseAccepted() OVERRIDE; | 112 virtual void OnPassphraseAccepted() override; |
113 virtual void OnBootstrapTokenUpdated( | 113 virtual void OnBootstrapTokenUpdated( |
114 const std::string& bootstrap_token, | 114 const std::string& bootstrap_token, |
115 syncer::BootstrapTokenType type) OVERRIDE; | 115 syncer::BootstrapTokenType type) override; |
116 virtual void OnEncryptedTypesChanged( | 116 virtual void OnEncryptedTypesChanged( |
117 syncer::ModelTypeSet encrypted_types, | 117 syncer::ModelTypeSet encrypted_types, |
118 bool encrypt_everything) OVERRIDE; | 118 bool encrypt_everything) override; |
119 virtual void OnEncryptionComplete() OVERRIDE; | 119 virtual void OnEncryptionComplete() override; |
120 virtual void OnCryptographerStateChanged( | 120 virtual void OnCryptographerStateChanged( |
121 syncer::Cryptographer* cryptographer) OVERRIDE; | 121 syncer::Cryptographer* cryptographer) override; |
122 virtual void OnPassphraseTypeChanged(syncer::PassphraseType type, | 122 virtual void OnPassphraseTypeChanged(syncer::PassphraseType type, |
123 base::Time passphrase_time) OVERRIDE; | 123 base::Time passphrase_time) override; |
124 | 124 |
125 // TypeDebugInfoObserver implementation | 125 // TypeDebugInfoObserver implementation |
126 virtual void OnCommitCountersUpdated( | 126 virtual void OnCommitCountersUpdated( |
127 syncer::ModelType type, | 127 syncer::ModelType type, |
128 const syncer::CommitCounters& counters) OVERRIDE; | 128 const syncer::CommitCounters& counters) override; |
129 virtual void OnUpdateCountersUpdated( | 129 virtual void OnUpdateCountersUpdated( |
130 syncer::ModelType type, | 130 syncer::ModelType type, |
131 const syncer::UpdateCounters& counters) OVERRIDE; | 131 const syncer::UpdateCounters& counters) override; |
132 virtual void OnStatusCountersUpdated( | 132 virtual void OnStatusCountersUpdated( |
133 syncer::ModelType type, | 133 syncer::ModelType type, |
134 const syncer::StatusCounters& counters) OVERRIDE; | 134 const syncer::StatusCounters& counters) override; |
135 | 135 |
136 // Forwards an invalidation state change to the sync manager. | 136 // Forwards an invalidation state change to the sync manager. |
137 void DoOnInvalidatorStateChange(syncer::InvalidatorState state); | 137 void DoOnInvalidatorStateChange(syncer::InvalidatorState state); |
138 | 138 |
139 // Forwards an invalidation to the sync manager. | 139 // Forwards an invalidation to the sync manager. |
140 void DoOnIncomingInvalidation( | 140 void DoOnIncomingInvalidation( |
141 const syncer::ObjectIdInvalidationMap& invalidation_map); | 141 const syncer::ObjectIdInvalidationMap& invalidation_map); |
142 | 142 |
143 // Note: | 143 // Note: |
144 // | 144 // |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 bool forward_type_info_; | 307 bool forward_type_info_; |
308 | 308 |
309 base::WeakPtrFactory<SyncBackendHostCore> weak_ptr_factory_; | 309 base::WeakPtrFactory<SyncBackendHostCore> weak_ptr_factory_; |
310 | 310 |
311 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostCore); | 311 DISALLOW_COPY_AND_ASSIGN(SyncBackendHostCore); |
312 }; | 312 }; |
313 | 313 |
314 } // namespace browser_sync | 314 } // namespace browser_sync |
315 | 315 |
316 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_CORE_H_ | 316 #endif // CHROME_BROWSER_SYNC_GLUE_SYNC_BACKEND_HOST_CORE_H_ |
OLD | NEW |