OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 17 matching lines...) Expand all Loading... |
28 #include "chrome/browser/sync/profile_sync_service_observer.h" | 28 #include "chrome/browser/sync/profile_sync_service_observer.h" |
29 #include "chrome/browser/sync/sync_prefs.h" | 29 #include "chrome/browser/sync/sync_prefs.h" |
30 #include "chrome/common/net/gaia/google_service_auth_error.h" | 30 #include "chrome/common/net/gaia/google_service_auth_error.h" |
31 #include "content/public/browser/notification_observer.h" | 31 #include "content/public/browser/notification_observer.h" |
32 #include "content/public/browser/notification_registrar.h" | 32 #include "content/public/browser/notification_registrar.h" |
33 #include "content/public/browser/notification_types.h" | 33 #include "content/public/browser/notification_types.h" |
34 #include "googleurl/src/gurl.h" | 34 #include "googleurl/src/gurl.h" |
35 #include "sync/engine/model_safe_worker.h" | 35 #include "sync/engine/model_safe_worker.h" |
36 #include "sync/js/sync_js_controller.h" | 36 #include "sync/js/sync_js_controller.h" |
37 #include "sync/syncable/model_type.h" | 37 #include "sync/syncable/model_type.h" |
| 38 #include "sync/util/sync_experiments.h" |
38 #include "sync/util/unrecoverable_error_handler.h" | 39 #include "sync/util/unrecoverable_error_handler.h" |
39 | 40 |
40 class Profile; | 41 class Profile; |
41 class ProfileSyncComponentsFactory; | 42 class ProfileSyncComponentsFactory; |
42 class SigninManager; | 43 class SigninManager; |
43 class SyncGlobalError; | 44 class SyncGlobalError; |
44 | 45 |
45 namespace browser_sync { | 46 namespace browser_sync { |
46 class BackendMigrator; | 47 class BackendMigrator; |
47 class ChangeProcessor; | 48 class ChangeProcessor; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 virtual void OnPassphraseRequired( | 229 virtual void OnPassphraseRequired( |
229 sync_api::PassphraseRequiredReason reason, | 230 sync_api::PassphraseRequiredReason reason, |
230 const sync_pb::EncryptedData& pending_keys) OVERRIDE; | 231 const sync_pb::EncryptedData& pending_keys) OVERRIDE; |
231 virtual void OnPassphraseAccepted() OVERRIDE; | 232 virtual void OnPassphraseAccepted() OVERRIDE; |
232 virtual void OnEncryptedTypesChanged( | 233 virtual void OnEncryptedTypesChanged( |
233 syncable::ModelTypeSet encrypted_types, | 234 syncable::ModelTypeSet encrypted_types, |
234 bool encrypt_everything) OVERRIDE; | 235 bool encrypt_everything) OVERRIDE; |
235 virtual void OnEncryptionComplete() OVERRIDE; | 236 virtual void OnEncryptionComplete() OVERRIDE; |
236 virtual void OnMigrationNeededForTypes( | 237 virtual void OnMigrationNeededForTypes( |
237 syncable::ModelTypeSet types) OVERRIDE; | 238 syncable::ModelTypeSet types) OVERRIDE; |
238 virtual void OnDataTypesChanged( | 239 virtual void OnExperimentsChanged( |
239 syncable::ModelTypeSet to_add) OVERRIDE; | 240 const browser_sync::SyncExperiments& experiments) OVERRIDE; |
240 virtual void OnActionableError( | 241 virtual void OnActionableError( |
241 const browser_sync::SyncProtocolError& error) OVERRIDE; | 242 const browser_sync::SyncProtocolError& error) OVERRIDE; |
242 | 243 |
243 void OnClearServerDataTimeout(); | 244 void OnClearServerDataTimeout(); |
244 | 245 |
245 // Update the last auth error and notify observers of error state. | 246 // Update the last auth error and notify observers of error state. |
246 void UpdateAuthErrorState(const GoogleServiceAuthError& error); | 247 void UpdateAuthErrorState(const GoogleServiceAuthError& error); |
247 | 248 |
248 // Called when a user chooses which data types to sync as part of the sync | 249 // Called when a user chooses which data types to sync as part of the sync |
249 // setup wizard. |sync_everything| represents whether they chose the | 250 // setup wizard. |sync_everything| represents whether they chose the |
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 | 739 |
739 scoped_ptr<browser_sync::BackendUnrecoverableErrorHandler> | 740 scoped_ptr<browser_sync::BackendUnrecoverableErrorHandler> |
740 backend_unrecoverable_error_handler_; | 741 backend_unrecoverable_error_handler_; |
741 | 742 |
742 browser_sync::DataTypeManager::ConfigureStatus configure_status_; | 743 browser_sync::DataTypeManager::ConfigureStatus configure_status_; |
743 | 744 |
744 // If |true|, there is setup UI visible so we should not start downloading | 745 // If |true|, there is setup UI visible so we should not start downloading |
745 // data types. | 746 // data types. |
746 bool setup_in_progress_; | 747 bool setup_in_progress_; |
747 | 748 |
| 749 // The set of currently enabled sync experiments. |
| 750 browser_sync::SyncExperiments current_experiments; |
| 751 |
748 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); | 752 DISALLOW_COPY_AND_ASSIGN(ProfileSyncService); |
749 }; | 753 }; |
750 | 754 |
751 bool ShouldShowActionOnUI( | 755 bool ShouldShowActionOnUI( |
752 const browser_sync::SyncProtocolError& error); | 756 const browser_sync::SyncProtocolError& error); |
753 | 757 |
754 | 758 |
755 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ | 759 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_H_ |
OLD | NEW |