| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 IOS_CHROME_BROWSER_SYNC_SYNC_SETUP_SERVICE_H_ | 5 #ifndef IOS_CHROME_BROWSER_SYNC_SYNC_SETUP_SERVICE_H_ |
| 6 #define IOS_CHROME_BROWSER_SYNC_SYNC_SETUP_SERVICE_H_ | 6 #define IOS_CHROME_BROWSER_SYNC_SYNC_SETUP_SERVICE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 // Returns the |syncer::ModelType| associated to the given | 54 // Returns the |syncer::ModelType| associated to the given |
| 55 // |SyncableDatatypes|. | 55 // |SyncableDatatypes|. |
| 56 syncer::ModelType GetModelType(SyncableDatatype datatype); | 56 syncer::ModelType GetModelType(SyncableDatatype datatype); |
| 57 | 57 |
| 58 // Returns whether sync is enabled. | 58 // Returns whether sync is enabled. |
| 59 virtual bool IsSyncEnabled() const; | 59 virtual bool IsSyncEnabled() const; |
| 60 // Enables or disables sync. Changes won't take effect in the sync backend | 60 // Enables or disables sync. Changes won't take effect in the sync backend |
| 61 // before the next call to |CommitChanges|. | 61 // before the next call to |CommitChanges|. |
| 62 virtual void SetSyncEnabled(bool sync_enabled); | 62 virtual void SetSyncEnabled(bool sync_enabled); |
| 63 // Returns whether secondary passphrase is enabled. |
| 64 virtual bool IsSecondaryPassphraseEnabled() const; |
| 63 | 65 |
| 64 // Returns all currently enabled datatypes. | 66 // Returns all currently enabled datatypes. |
| 65 syncer::ModelTypeSet GetDataTypes() const; | 67 syncer::ModelTypeSet GetDataTypes() const; |
| 66 // Returns whether the given datatype is enabled. | 68 // Returns whether the given datatype is enabled. |
| 67 virtual bool IsDataTypeEnabled(syncer::ModelType datatype) const; | 69 virtual bool IsDataTypeEnabled(syncer::ModelType datatype) const; |
| 68 // Enables or disables the given datatype. To be noted: this can be called at | 70 // Enables or disables the given datatype. To be noted: this can be called at |
| 69 // any time, but will only be meaningful if |IsSyncEnabled| is true and | 71 // any time, but will only be meaningful if |IsSyncEnabled| is true and |
| 70 // |IsSyncingAllDataTypes| is false. Changes won't take effect in the sync | 72 // |IsSyncingAllDataTypes| is false. Changes won't take effect in the sync |
| 71 // backend before the next call to |CommitChanges|. | 73 // backend before the next call to |CommitChanges|. |
| 72 void SetDataTypeEnabled(syncer::ModelType datatype, bool enabled); | 74 void SetDataTypeEnabled(syncer::ModelType datatype, bool enabled); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 PrefService* const prefs_; | 111 PrefService* const prefs_; |
| 110 syncer::ModelTypeSet user_selectable_types_; | 112 syncer::ModelTypeSet user_selectable_types_; |
| 111 | 113 |
| 112 // Prevents Sync from running until configuration is complete. | 114 // Prevents Sync from running until configuration is complete. |
| 113 std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_; | 115 std::unique_ptr<syncer::SyncSetupInProgressHandle> sync_blocker_; |
| 114 | 116 |
| 115 DISALLOW_COPY_AND_ASSIGN(SyncSetupService); | 117 DISALLOW_COPY_AND_ASSIGN(SyncSetupService); |
| 116 }; | 118 }; |
| 117 | 119 |
| 118 #endif // IOS_CHROME_BROWSER_SYNC_SYNC_SETUP_SERVICE_H_ | 120 #endif // IOS_CHROME_BROWSER_SYNC_SYNC_SETUP_SERVICE_H_ |
| OLD | NEW |