| 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 <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 // single thread. If we want multiple threads to access this(and there is | 282 // single thread. If we want multiple threads to access this(and there is |
| 283 // currently no need to do so) we need to protect this with a lock. | 283 // currently no need to do so) we need to protect this with a lock. |
| 284 // TODO(timsteele): What happens if the bookmark model is loaded, a change | 284 // TODO(timsteele): What happens if the bookmark model is loaded, a change |
| 285 // takes place, and the backend isn't initialized yet? | 285 // takes place, and the backend isn't initialized yet? |
| 286 bool sync_initialized() const { return backend_initialized_; } | 286 bool sync_initialized() const { return backend_initialized_; } |
| 287 virtual bool unrecoverable_error_detected() const; | 287 virtual bool unrecoverable_error_detected() const; |
| 288 const std::string& unrecoverable_error_message() { | 288 const std::string& unrecoverable_error_message() { |
| 289 return unrecoverable_error_message_; | 289 return unrecoverable_error_message_; |
| 290 } | 290 } |
| 291 tracked_objects::Location unrecoverable_error_location() { | 291 tracked_objects::Location unrecoverable_error_location() { |
| 292 return unrecoverable_error_location_.get() ? | 292 return unrecoverable_error_location_; |
| 293 *unrecoverable_error_location_.get() : tracked_objects::Location(); | |
| 294 } | 293 } |
| 295 | 294 |
| 296 bool UIShouldDepictAuthInProgress() const { | 295 bool UIShouldDepictAuthInProgress() const { |
| 297 return is_auth_in_progress_; | 296 return is_auth_in_progress_; |
| 298 } | 297 } |
| 299 | 298 |
| 300 // Returns true if OnPassphraseRequired has been called for any reason. | 299 // Returns true if OnPassphraseRequired has been called for any reason. |
| 301 bool IsPassphraseRequired() const { | 300 bool IsPassphraseRequired() const { |
| 302 return passphrase_required_reason_ != | 301 return passphrase_required_reason_ != |
| 303 sync_api::REASON_PASSPHRASE_NOT_REQUIRED; | 302 sync_api::REASON_PASSPHRASE_NOT_REQUIRED; |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 // Encapsulates user signin with TokenService. | 598 // Encapsulates user signin with TokenService. |
| 600 scoped_ptr<SigninManager> signin_; | 599 scoped_ptr<SigninManager> signin_; |
| 601 | 600 |
| 602 // True if an unrecoverable error (e.g. violation of an assumed invariant) | 601 // True if an unrecoverable error (e.g. violation of an assumed invariant) |
| 603 // occurred during syncer operation. This value should be checked before | 602 // occurred during syncer operation. This value should be checked before |
| 604 // doing any work that might corrupt things further. | 603 // doing any work that might corrupt things further. |
| 605 bool unrecoverable_error_detected_; | 604 bool unrecoverable_error_detected_; |
| 606 | 605 |
| 607 // A message sent when an unrecoverable error occurred. | 606 // A message sent when an unrecoverable error occurred. |
| 608 std::string unrecoverable_error_message_; | 607 std::string unrecoverable_error_message_; |
| 609 scoped_ptr<tracked_objects::Location> unrecoverable_error_location_; | 608 tracked_objects::Location unrecoverable_error_location_; |
| 610 | 609 |
| 611 // Manages the start and stop of the various data types. | 610 // Manages the start and stop of the various data types. |
| 612 scoped_ptr<browser_sync::DataTypeManager> data_type_manager_; | 611 scoped_ptr<browser_sync::DataTypeManager> data_type_manager_; |
| 613 | 612 |
| 614 ObserverList<Observer> observers_; | 613 ObserverList<Observer> observers_; |
| 615 | 614 |
| 616 browser_sync::SyncJsController sync_js_controller_; | 615 browser_sync::SyncJsController sync_js_controller_; |
| 617 | 616 |
| 618 NotificationRegistrar registrar_; | 617 NotificationRegistrar registrar_; |
| 619 | 618 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 668 browser_sync::SyncProtocolError last_actionable_error_; | 667 browser_sync::SyncProtocolError last_actionable_error_; |
| 669 | 668 |
| 670 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 669 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| 671 }; | 670 }; |
| 672 | 671 |
| 673 bool ShouldShowActionOnUI( | 672 bool ShouldShowActionOnUI( |
| 674 const browser_sync::SyncProtocolError& error); | 673 const browser_sync::SyncProtocolError& error); |
| 675 | 674 |
| 676 | 675 |
| 677 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 676 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |