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 22 matching lines...) Expand all Loading... |
33 #include "content/common/content_notification_types.h" | 33 #include "content/common/content_notification_types.h" |
34 #include "content/common/notification_observer.h" | 34 #include "content/common/notification_observer.h" |
35 #include "content/common/notification_registrar.h" | 35 #include "content/common/notification_registrar.h" |
36 #include "googleurl/src/gurl.h" | 36 #include "googleurl/src/gurl.h" |
37 | 37 |
38 class NotificationDetails; | 38 class NotificationDetails; |
39 class NotificationSource; | 39 class NotificationSource; |
40 class Profile; | 40 class Profile; |
41 class ProfileSyncFactory; | 41 class ProfileSyncFactory; |
42 class SigninManager; | 42 class SigninManager; |
| 43 class SyncGlobalError; |
43 struct ChromeCookieDetails; | 44 struct ChromeCookieDetails; |
44 | 45 |
45 namespace browser_sync { | 46 namespace browser_sync { |
46 class BackendMigrator; | 47 class BackendMigrator; |
47 class ChangeProcessor; | 48 class ChangeProcessor; |
48 class DataTypeManager; | 49 class DataTypeManager; |
49 class JsController; | 50 class JsController; |
50 class SessionModelAssociator; | 51 class SessionModelAssociator; |
51 namespace sessions { struct SyncSessionSnapshot; } | 52 namespace sessions { struct SyncSessionSnapshot; } |
52 } | 53 } |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 const std::string& cros_user() const { return cros_user_; } | 479 const std::string& cros_user() const { return cros_user_; } |
479 | 480 |
480 // Returns the set of unacknowledged types (new data types added since the | 481 // Returns the set of unacknowledged types (new data types added since the |
481 // last call to AcknowledgedSyncTypes()).. | 482 // last call to AcknowledgedSyncTypes()).. |
482 syncable::ModelTypeBitSet GetUnacknowledgedTypes() const; | 483 syncable::ModelTypeBitSet GetUnacknowledgedTypes() const; |
483 | 484 |
484 // Marks all currently registered types as "acknowledged" so we won't prompt | 485 // Marks all currently registered types as "acknowledged" so we won't prompt |
485 // the user about them any more. | 486 // the user about them any more. |
486 void AcknowledgeSyncedTypes(); | 487 void AcknowledgeSyncedTypes(); |
487 | 488 |
| 489 SyncGlobalError* sync_global_error() { return sync_global_error_.get(); } |
| 490 |
488 protected: | 491 protected: |
489 // Used by test classes that derive from ProfileSyncService. | 492 // Used by test classes that derive from ProfileSyncService. |
490 virtual browser_sync::SyncBackendHost* GetBackendForTest(); | 493 virtual browser_sync::SyncBackendHost* GetBackendForTest(); |
491 | 494 |
492 // Helper to install and configure a data type manager. | 495 // Helper to install and configure a data type manager. |
493 void ConfigureDataTypeManager(); | 496 void ConfigureDataTypeManager(); |
494 | 497 |
495 // Starts up the backend sync components. | 498 // Starts up the backend sync components. |
496 void StartUp(); | 499 void StartUp(); |
497 // Shuts down the backend sync components. | 500 // Shuts down the backend sync components. |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 // typically enabled on platforms (like ChromeOS) that have their own | 669 // typically enabled on platforms (like ChromeOS) that have their own |
667 // distinct signin flow. | 670 // distinct signin flow. |
668 bool auto_start_enabled_; | 671 bool auto_start_enabled_; |
669 | 672 |
670 scoped_ptr<browser_sync::BackendMigrator> migrator_; | 673 scoped_ptr<browser_sync::BackendMigrator> migrator_; |
671 | 674 |
672 // This is the last |SyncProtocolError| we received from the server that had | 675 // This is the last |SyncProtocolError| we received from the server that had |
673 // an action set on it. | 676 // an action set on it. |
674 browser_sync::SyncProtocolError last_actionable_error_; | 677 browser_sync::SyncProtocolError last_actionable_error_; |
675 | 678 |
| 679 // This is used to show sync errors in the wrench menu. |
| 680 scoped_ptr<SyncGlobalError> sync_global_error_; |
| 681 |
676 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 682 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
677 }; | 683 }; |
678 | 684 |
679 bool ShouldShowActionOnUI( | 685 bool ShouldShowActionOnUI( |
680 const browser_sync::SyncProtocolError& error); | 686 const browser_sync::SyncProtocolError& error); |
681 | 687 |
682 | 688 |
683 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 689 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |