OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ |
6 #define COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ | 6 #define COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // The user requests that sync start. This only actually starts sync if | 134 // The user requests that sync start. This only actually starts sync if |
135 // IsSyncAllowed is true and the user is signed in. Once sync starts, | 135 // IsSyncAllowed is true and the user is signed in. Once sync starts, |
136 // other things such as HasSyncSetupCompleted being false can still prevent | 136 // other things such as HasSyncSetupCompleted being false can still prevent |
137 // it from moving into the "active" state. | 137 // it from moving into the "active" state. |
138 virtual void RequestStart() = 0; | 138 virtual void RequestStart() = 0; |
139 | 139 |
140 // Returns the set of types which are preferred for enabling. This is a | 140 // Returns the set of types which are preferred for enabling. This is a |
141 // superset of the active types (see GetActiveDataTypes()). | 141 // superset of the active types (see GetActiveDataTypes()). |
142 virtual syncer::ModelTypeSet GetPreferredDataTypes() const = 0; | 142 virtual syncer::ModelTypeSet GetPreferredDataTypes() const = 0; |
143 | 143 |
144 // Called when a user chooses which data types to sync as part of the sync | 144 // Called when a user chooses which data types to sync. |sync_everything| |
145 // setup wizard. |sync_everything| represents whether they chose the | 145 // represents whether they chose the "keep everything synced" option; if |
146 // "keep everything synced" option; if true, |chosen_types| will be ignored | 146 // true, |chosen_types| will be ignored and all data types will be synced. |
147 // and all data types will be synced. |sync_everything| means "sync all | 147 // |sync_everything| means "sync all current and future data types." |
148 // current and future data types." | 148 // |chosen_types| must be a subset of syncer::UserSelectableTypes(). |
149 virtual void OnUserChoseDatatypes(bool sync_everything, | 149 virtual void OnUserChoseDatatypes(bool sync_everything, |
150 syncer::ModelTypeSet chosen_types) = 0; | 150 syncer::ModelTypeSet chosen_types) = 0; |
151 | 151 |
152 // Called whe Sync has been setup by the user and can be started. | 152 // Called whe Sync has been setup by the user and can be started. |
153 virtual void SetSyncSetupCompleted() = 0; | 153 virtual void SetSyncSetupCompleted() = 0; |
154 | 154 |
155 // Returns true if initial sync setup is in progress (does not return true | 155 // Returns true if initial sync setup is in progress (does not return true |
156 // if the user is customizing sync after already completing setup once). | 156 // if the user is customizing sync after already completing setup once). |
157 // SyncService uses this to determine if it's OK to start syncing, or if the | 157 // SyncService uses this to determine if it's OK to start syncing, or if the |
158 // user is still setting up the initial sync configuration. | 158 // user is still setting up the initial sync configuration. |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 protected: | 292 protected: |
293 SyncService() {} | 293 SyncService() {} |
294 | 294 |
295 private: | 295 private: |
296 DISALLOW_COPY_AND_ASSIGN(SyncService); | 296 DISALLOW_COPY_AND_ASSIGN(SyncService); |
297 }; | 297 }; |
298 | 298 |
299 } // namespace sync_driver | 299 } // namespace sync_driver |
300 | 300 |
301 #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ | 301 #endif // COMPONENTS_SYNC_DRIVER_SYNC_SERVICE_H_ |
OLD | NEW |