Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / supervised_user / supervised_user_sync_data_type_controller.h
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
3 // found in the LICENSE file.
4
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_
7
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "components/sync_driver/data_type_controller.h"
11 #include "components/sync_driver/ui_data_type_controller.h"
12
13 namespace sync_driver {
14 class SyncApiComponentFactory;
15 }
16
17 class Profile;
18
19 // A UIDataTypeController for supervised user sync datatypes, which enables or
20 // disables these types based on the profile's IsSupervised state.
21 class SupervisedUserSyncDataTypeController
22     : public sync_driver::UIDataTypeController {
23  public:
24   SupervisedUserSyncDataTypeController(
25       syncer::ModelType type,
26       sync_driver::SyncApiComponentFactory* sync_factory,
27       Profile* profile);
28
29   bool ReadyForStart() const override;
30
31  private:
32   // DataTypeController is RefCounted.
33   ~SupervisedUserSyncDataTypeController() override;
34
35   Profile* profile_;
36
37   DISALLOW_COPY_AND_ASSIGN(SupervisedUserSyncDataTypeController);
38 };
39
40 #endif  // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_SYNC_DATA_TYPE_CONTROLLER_H_