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