| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_DATA_TYPE_MANAGER_H__ | 5 #ifndef COMPONENTS_SYNC_DRIVER_DATA_TYPE_MANAGER_H__ |
| 6 #define COMPONENTS_SYNC_DRIVER_DATA_TYPE_MANAGER_H__ | 6 #define COMPONENTS_SYNC_DRIVER_DATA_TYPE_MANAGER_H__ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "components/sync_driver/data_type_controller.h" | 12 #include "components/sync_driver/data_type_controller.h" |
| 13 #include "sync/api/sync_error.h" | 13 #include "sync/api/sync_error.h" |
| 14 #include "sync/internal_api/public/base/model_type.h" | 14 #include "sync/internal_api/public/base/model_type.h" |
| 15 #include "sync/internal_api/public/configure_reason.h" | 15 #include "sync/internal_api/public/configure_reason.h" |
| 16 | 16 |
| 17 namespace browser_sync { | 17 namespace sync_driver { |
| 18 | 18 |
| 19 // This interface is for managing the start up and shut down life cycle | 19 // This interface is for managing the start up and shut down life cycle |
| 20 // of many different syncable data types. | 20 // of many different syncable data types. |
| 21 class DataTypeManager { | 21 class DataTypeManager { |
| 22 public: | 22 public: |
| 23 enum State { | 23 enum State { |
| 24 STOPPED, // No data types are currently running. | 24 STOPPED, // No data types are currently running. |
| 25 DOWNLOAD_PENDING, // Not implemented yet: Waiting for the syncer to | 25 DOWNLOAD_PENDING, // Not implemented yet: Waiting for the syncer to |
| 26 // complete the initial download of new data | 26 // complete the initial download of new data |
| 27 // types. | 27 // types. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // Synchronously stops all registered data types. If called after | 99 // Synchronously stops all registered data types. If called after |
| 100 // Configure() is called but before it finishes, it will abort the | 100 // Configure() is called but before it finishes, it will abort the |
| 101 // configure and any data types that have been started will be | 101 // configure and any data types that have been started will be |
| 102 // stopped. | 102 // stopped. |
| 103 virtual void Stop() = 0; | 103 virtual void Stop() = 0; |
| 104 | 104 |
| 105 // The current state of the data type manager. | 105 // The current state of the data type manager. |
| 106 virtual State state() const = 0; | 106 virtual State state() const = 0; |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 } // namespace browser_sync | 109 } // namespace sync_driver |
| 110 | 110 |
| 111 #endif // COMPONENTS_SYNC_DRIVER_DATA_TYPE_MANAGER_H__ | 111 #endif // COMPONENTS_SYNC_DRIVER_DATA_TYPE_MANAGER_H__ |
| OLD | NEW |