| 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_SYNC_GLUE_EXTENSION_BACKED_DATA_TYPE_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_EXTENSION_BACKED_DATA_TYPE_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_EXTENSION_BACKED_DATA_TYPE_CONTROLLER_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_EXTENSION_BACKED_DATA_TYPE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "components/sync_driver/ui_data_type_controller.h" | 11 #include "components/sync_driver/ui_data_type_controller.h" |
| 12 #include "extensions/browser/extension_registry_observer.h" | 12 #include "extensions/browser/extension_registry_observer.h" |
| 13 | 13 |
| 14 class Profile; | 14 class Profile; |
| 15 | 15 |
| 16 namespace browser_sync { | 16 namespace browser_sync { |
| 17 | 17 |
| 18 // A data type controller for types backed by an extension. Manages waiting for | 18 // A data type controller for types backed by an extension. Manages waiting for |
| 19 // extension enable/disable and triggering reconfigurations as necessary. | 19 // extension enable/disable and triggering reconfigurations as necessary. |
| 20 class ExtensionBackedDataTypeController | 20 class ExtensionBackedDataTypeController |
| 21 : public UIDataTypeController, | 21 : public sync_driver::UIDataTypeController, |
| 22 public extensions::ExtensionRegistryObserver { | 22 public extensions::ExtensionRegistryObserver { |
| 23 public: | 23 public: |
| 24 ExtensionBackedDataTypeController( | 24 ExtensionBackedDataTypeController( |
| 25 const DisableTypeCallback& disable_callback, | 25 const DisableTypeCallback& disable_callback, |
| 26 syncer::ModelType type, | 26 syncer::ModelType type, |
| 27 const std::string& extension_hash, | 27 const std::string& extension_hash, |
| 28 SyncApiComponentFactory* sync_factory, | 28 sync_driver::SyncApiComponentFactory* sync_factory, |
| 29 Profile* profile); | 29 Profile* profile); |
| 30 | 30 |
| 31 // UIDataTypeController overrides. | 31 // UIDataTypeController overrides. |
| 32 virtual bool ReadyForStart() const OVERRIDE; | 32 virtual bool ReadyForStart() const OVERRIDE; |
| 33 virtual bool StartModels() OVERRIDE; | 33 virtual bool StartModels() OVERRIDE; |
| 34 | 34 |
| 35 // ExtensionRegistryObserver implementation. | 35 // ExtensionRegistryObserver implementation. |
| 36 virtual void OnExtensionLoaded( | 36 virtual void OnExtensionLoaded( |
| 37 content::BrowserContext* browser_context, | 37 content::BrowserContext* browser_context, |
| 38 const extensions::Extension* extension) OVERRIDE; | 38 const extensions::Extension* extension) OVERRIDE; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 56 | 56 |
| 57 // The owning profile. | 57 // The owning profile. |
| 58 Profile* profile_; | 58 Profile* profile_; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(ExtensionBackedDataTypeController); | 60 DISALLOW_COPY_AND_ASSIGN(ExtensionBackedDataTypeController); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace browser_sync | 63 } // namespace browser_sync |
| 64 | 64 |
| 65 #endif // CHROME_BROWSER_SYNC_GLUE_EXTENSION_BACKED_DATA_TYPE_CONTROLLER_H_ | 65 #endif // CHROME_BROWSER_SYNC_GLUE_EXTENSION_BACKED_DATA_TYPE_CONTROLLER_H_ |
| OLD | NEW |