Home | History | Annotate | Download | only in glue
      1 // Copyright (c) 2012 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_SYNC_GLUE_EXTENSION_SETTING_DATA_TYPE_CONTROLLER_H__
      6 #define CHROME_BROWSER_SYNC_GLUE_EXTENSION_SETTING_DATA_TYPE_CONTROLLER_H__
      7 
      8 #include <string>
      9 
     10 #include "base/compiler_specific.h"
     11 #include "chrome/browser/sync/glue/non_ui_data_type_controller.h"
     12 
     13 class Profile;
     14 class ProfileSyncComponentsFactory;
     15 class ProfileSyncService;
     16 
     17 namespace syncer {
     18 class SyncableService;
     19 }
     20 
     21 namespace extensions {
     22 class SettingsFrontend;
     23 }
     24 
     25 namespace browser_sync {
     26 
     27 class ExtensionSettingDataTypeController
     28     : public NonUIDataTypeController {
     29  public:
     30   ExtensionSettingDataTypeController(
     31       // Either EXTENSION_SETTINGS or APP_SETTINGS.
     32       syncer::ModelType type,
     33       ProfileSyncComponentsFactory* profile_sync_factory,
     34       Profile* profile,
     35       ProfileSyncService* profile_sync_service);
     36 
     37   // NonFrontendDataTypeController implementation
     38   virtual syncer::ModelType type() const OVERRIDE;
     39   virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE;
     40 
     41  private:
     42   virtual ~ExtensionSettingDataTypeController();
     43 
     44   // NonFrontendDataTypeController implementation.
     45   virtual bool PostTaskOnBackendThread(
     46       const tracked_objects::Location& from_here,
     47       const base::Closure& task) OVERRIDE;
     48   virtual bool StartModels() OVERRIDE;
     49 
     50   // Either EXTENSION_SETTINGS or APP_SETTINGS.
     51   syncer::ModelType type_;
     52 
     53   // These only used on the UI thread.
     54   Profile* profile_;
     55   ProfileSyncService* profile_sync_service_;
     56 
     57   DISALLOW_COPY_AND_ASSIGN(ExtensionSettingDataTypeController);
     58 };
     59 
     60 }  // namespace browser_sync
     61 
     62 #endif  // CHROME_BROWSER_SYNC_GLUE_EXTENSION_SETTING_DATA_TYPE_CONTROLLER_H__
     63