| 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 CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SYNC_DATA_TYPE_CONTROLLER
_H_ | 5 #ifndef CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SYNC_DATA_TYPE_CONTROLLER
_H_ |
| 6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SYNC_DATA_TYPE_CONTROLLER
_H_ | 6 #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SYNC_DATA_TYPE_CONTROLLER
_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "components/sync/driver/async_directory_type_controller.h" |
| 9 #include "components/sync/driver/data_type_controller.h" | 10 #include "components/sync/driver/data_type_controller.h" |
| 10 #include "components/sync/driver/non_ui_data_type_controller.h" | |
| 11 | 11 |
| 12 class Profile; | 12 class Profile; |
| 13 | 13 |
| 14 namespace syncer { | 14 namespace syncer { |
| 15 class SyncClient; | 15 class SyncClient; |
| 16 } | 16 } |
| 17 | 17 |
| 18 // A DataTypeController for supervised user sync datatypes, which enables or | 18 // A DataTypeController for supervised user sync datatypes, which enables or |
| 19 // disables these types based on the profile's IsSupervised state. | 19 // disables these types based on the profile's IsSupervised state. |
| 20 class SupervisedUserSyncDataTypeController | 20 class SupervisedUserSyncDataTypeController |
| 21 : public syncer::NonUIDataTypeController { | 21 : public syncer::AsyncDirectoryTypeController { |
| 22 public: | 22 public: |
| 23 // |dump_stack| is called when an unrecoverable error occurs. | 23 // |dump_stack| is called when an unrecoverable error occurs. |
| 24 SupervisedUserSyncDataTypeController(syncer::ModelType type, | 24 SupervisedUserSyncDataTypeController(syncer::ModelType type, |
| 25 const base::Closure& dump_stack, | 25 const base::Closure& dump_stack, |
| 26 syncer::SyncClient* sync_client, | 26 syncer::SyncClient* sync_client, |
| 27 Profile* profile); | 27 Profile* profile); |
| 28 ~SupervisedUserSyncDataTypeController() override; | 28 ~SupervisedUserSyncDataTypeController() override; |
| 29 | 29 |
| 30 // NonUIDataTypeController implementation. | 30 // AsyncDirectoryTypeController implementation. |
| 31 bool ReadyForStart() const override; | 31 bool ReadyForStart() const override; |
| 32 | 32 |
| 33 private: | 33 private: |
| 34 Profile* profile_; | 34 Profile* profile_; |
| 35 | 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(SupervisedUserSyncDataTypeController); | 36 DISALLOW_COPY_AND_ASSIGN(SupervisedUserSyncDataTypeController); |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SYNC_DATA_TYPE_CONTROL
LER_H_ | 39 #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SYNC_DATA_TYPE_CONTROL
LER_H_ |
| OLD | NEW |