| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 // typically enabled on platforms (like ChromeOS) that have their own | 667 // typically enabled on platforms (like ChromeOS) that have their own |
| 665 // distinct signin flow. | 668 // distinct signin flow. |
| 666 bool auto_start_enabled_; | 669 bool auto_start_enabled_; |
| 667 | 670 |
| 668 scoped_ptr<browser_sync::BackendMigrator> migrator_; | 671 scoped_ptr<browser_sync::BackendMigrator> migrator_; |
| 669 | 672 |
| 670 // This is the last |SyncProtocolError| we received from the server that had | 673 // This is the last |SyncProtocolError| we received from the server that had |
| 671 // an action set on it. | 674 // an action set on it. |
| 672 browser_sync::SyncProtocolError last_actionable_error_; | 675 browser_sync::SyncProtocolError last_actionable_error_; |
| 673 | 676 |
| 677 // This is used to show sync errors in the wrench menu. |
| 678 scoped_ptr<SyncGlobalError> sync_global_error_; |
| 679 |
| 674 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 680 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
| 675 }; | 681 }; |
| 676 | 682 |
| 677 bool ShouldShowActionOnUI( | 683 bool ShouldShowActionOnUI( |
| 678 const browser_sync::SyncProtocolError& error); | 684 const browser_sync::SyncProtocolError& error); |
| 679 | 685 |
| 680 | 686 |
| 681 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 687 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
| OLD | NEW |