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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 // single thread. If we want multiple threads to access this(and there is | 286 // single thread. If we want multiple threads to access this(and there is |
287 // currently no need to do so) we need to protect this with a lock. | 287 // currently no need to do so) we need to protect this with a lock. |
288 // TODO(timsteele): What happens if the bookmark model is loaded, a change | 288 // TODO(timsteele): What happens if the bookmark model is loaded, a change |
289 // takes place, and the backend isn't initialized yet? | 289 // takes place, and the backend isn't initialized yet? |
290 virtual bool sync_initialized() const; | 290 virtual bool sync_initialized() const; |
291 virtual bool unrecoverable_error_detected() const; | 291 virtual bool unrecoverable_error_detected() const; |
292 const std::string& unrecoverable_error_message() { | 292 const std::string& unrecoverable_error_message() { |
293 return unrecoverable_error_message_; | 293 return unrecoverable_error_message_; |
294 } | 294 } |
295 tracked_objects::Location unrecoverable_error_location() { | 295 tracked_objects::Location unrecoverable_error_location() { |
296 return unrecoverable_error_location_.get() ? | 296 return unrecoverable_error_location_; |
297 *unrecoverable_error_location_.get() : tracked_objects::Location(); | |
298 } | 297 } |
299 | 298 |
300 bool UIShouldDepictAuthInProgress() const { | 299 bool UIShouldDepictAuthInProgress() const { |
301 return is_auth_in_progress_; | 300 return is_auth_in_progress_; |
302 } | 301 } |
303 | 302 |
304 // Returns true if OnPassphraseRequired has been called for any reason. | 303 // Returns true if OnPassphraseRequired has been called for any reason. |
305 bool IsPassphraseRequired() const { | 304 bool IsPassphraseRequired() const { |
306 return passphrase_required_reason_ != | 305 return passphrase_required_reason_ != |
307 sync_api::REASON_PASSPHRASE_NOT_REQUIRED; | 306 sync_api::REASON_PASSPHRASE_NOT_REQUIRED; |
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 // Encapsulates user signin with TokenService. | 605 // Encapsulates user signin with TokenService. |
607 scoped_ptr<SigninManager> signin_; | 606 scoped_ptr<SigninManager> signin_; |
608 | 607 |
609 // True if an unrecoverable error (e.g. violation of an assumed invariant) | 608 // True if an unrecoverable error (e.g. violation of an assumed invariant) |
610 // occurred during syncer operation. This value should be checked before | 609 // occurred during syncer operation. This value should be checked before |
611 // doing any work that might corrupt things further. | 610 // doing any work that might corrupt things further. |
612 bool unrecoverable_error_detected_; | 611 bool unrecoverable_error_detected_; |
613 | 612 |
614 // A message sent when an unrecoverable error occurred. | 613 // A message sent when an unrecoverable error occurred. |
615 std::string unrecoverable_error_message_; | 614 std::string unrecoverable_error_message_; |
616 scoped_ptr<tracked_objects::Location> unrecoverable_error_location_; | 615 tracked_objects::Location unrecoverable_error_location_; |
617 | 616 |
618 // Manages the start and stop of the various data types. | 617 // Manages the start and stop of the various data types. |
619 scoped_ptr<browser_sync::DataTypeManager> data_type_manager_; | 618 scoped_ptr<browser_sync::DataTypeManager> data_type_manager_; |
620 | 619 |
621 ObserverList<Observer> observers_; | 620 ObserverList<Observer> observers_; |
622 | 621 |
623 browser_sync::SyncJsController sync_js_controller_; | 622 browser_sync::SyncJsController sync_js_controller_; |
624 | 623 |
625 NotificationRegistrar registrar_; | 624 NotificationRegistrar registrar_; |
626 | 625 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 scoped_ptr<SyncGlobalError> sync_global_error_; | 676 scoped_ptr<SyncGlobalError> sync_global_error_; |
678 | 677 |
679 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 678 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
680 }; | 679 }; |
681 | 680 |
682 bool ShouldShowActionOnUI( | 681 bool ShouldShowActionOnUI( |
683 const browser_sync::SyncProtocolError& error); | 682 const browser_sync::SyncProtocolError& error); |
684 | 683 |
685 | 684 |
686 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 685 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |