OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PROFILE_SYNC_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <string> | 10 #include <string> |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 virtual void OnUserChoseDatatypes(bool sync_everything, | 242 virtual void OnUserChoseDatatypes(bool sync_everything, |
243 const syncable::ModelTypeSet& chosen_types); | 243 const syncable::ModelTypeSet& chosen_types); |
244 | 244 |
245 // Called when a user cancels any setup dialog (login, etc). | 245 // Called when a user cancels any setup dialog (login, etc). |
246 virtual void OnUserCancelledDialog(); | 246 virtual void OnUserCancelledDialog(); |
247 | 247 |
248 // Get various information for displaying in the user interface. | 248 // Get various information for displaying in the user interface. |
249 browser_sync::SyncBackendHost::StatusSummary QuerySyncStatusSummary(); | 249 browser_sync::SyncBackendHost::StatusSummary QuerySyncStatusSummary(); |
250 virtual browser_sync::SyncBackendHost::Status QueryDetailedSyncStatus(); | 250 virtual browser_sync::SyncBackendHost::Status QueryDetailedSyncStatus(); |
251 | 251 |
252 const GoogleServiceAuthError& GetAuthError() const { | 252 virtual const GoogleServiceAuthError& GetAuthError() const; |
253 return last_auth_error_; | |
254 } | |
255 | 253 |
256 // Displays a dialog for the user to enter GAIA credentials and attempt | 254 // Displays a dialog for the user to enter GAIA credentials and attempt |
257 // re-authentication, and returns true if it actually opened the dialog. | 255 // re-authentication, and returns true if it actually opened the dialog. |
258 // Returns false if a dialog is already showing, an auth attempt is in | 256 // Returns false if a dialog is already showing, an auth attempt is in |
259 // progress, the sync system is already authenticated, or some error | 257 // progress, the sync system is already authenticated, or some error |
260 // occurred preventing the action. We make it the duty of ProfileSyncService | 258 // occurred preventing the action. We make it the duty of ProfileSyncService |
261 // to open the dialog to easily ensure only one is ever showing. | 259 // to open the dialog to easily ensure only one is ever showing. |
262 virtual bool SetupInProgress() const; | 260 virtual bool SetupInProgress() const; |
263 bool WizardIsVisible() const { | 261 bool WizardIsVisible() const { |
264 return wizard_.IsVisible(); | 262 return wizard_.IsVisible(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 // takes place, and the backend isn't initialized yet? | 294 // takes place, and the backend isn't initialized yet? |
297 virtual bool sync_initialized() const; | 295 virtual bool sync_initialized() const; |
298 virtual bool unrecoverable_error_detected() const; | 296 virtual bool unrecoverable_error_detected() const; |
299 const std::string& unrecoverable_error_message() { | 297 const std::string& unrecoverable_error_message() { |
300 return unrecoverable_error_message_; | 298 return unrecoverable_error_message_; |
301 } | 299 } |
302 tracked_objects::Location unrecoverable_error_location() { | 300 tracked_objects::Location unrecoverable_error_location() { |
303 return unrecoverable_error_location_; | 301 return unrecoverable_error_location_; |
304 } | 302 } |
305 | 303 |
306 bool UIShouldDepictAuthInProgress() const { | 304 virtual bool UIShouldDepictAuthInProgress() const; |
307 return is_auth_in_progress_; | |
308 } | |
309 | 305 |
310 // Returns true if OnPassphraseRequired has been called for any reason. | 306 // Returns true if OnPassphraseRequired has been called for any reason. |
311 virtual bool IsPassphraseRequired() const; | 307 virtual bool IsPassphraseRequired() const; |
312 | 308 |
313 // Returns true if OnPassphraseRequired has been called for decryption and | 309 // Returns true if OnPassphraseRequired has been called for decryption and |
314 // we have an encrypted data type enabled. | 310 // we have an encrypted data type enabled. |
315 virtual bool IsPassphraseRequiredForDecryption() const; | 311 virtual bool IsPassphraseRequiredForDecryption() const; |
316 | 312 |
317 sync_api::PassphraseRequiredReason passphrase_required_reason() const { | 313 sync_api::PassphraseRequiredReason passphrase_required_reason() const { |
318 return passphrase_required_reason_; | 314 return passphrase_required_reason_; |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 FailedDatatypesHandler failed_datatypes_handler_; | 702 FailedDatatypesHandler failed_datatypes_handler_; |
707 | 703 |
708 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 704 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
709 }; | 705 }; |
710 | 706 |
711 bool ShouldShowActionOnUI( | 707 bool ShouldShowActionOnUI( |
712 const browser_sync::SyncProtocolError& error); | 708 const browser_sync::SyncProtocolError& error); |
713 | 709 |
714 | 710 |
715 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 711 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |