| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 : public sync_driver::UIDataTypeController, | 21 : public sync_driver::UIDataTypeController, |
| 22 public extensions::ExtensionRegistryObserver { | 22 public extensions::ExtensionRegistryObserver { |
| 23 public: | 23 public: |
| 24 ExtensionBackedDataTypeController( | 24 ExtensionBackedDataTypeController( |
| 25 syncer::ModelType type, | 25 syncer::ModelType type, |
| 26 const std::string& extension_hash, | 26 const std::string& extension_hash, |
| 27 sync_driver::SyncApiComponentFactory* sync_factory, | 27 sync_driver::SyncApiComponentFactory* sync_factory, |
| 28 Profile* profile); | 28 Profile* profile); |
| 29 | 29 |
| 30 // UIDataTypeController overrides. | 30 // UIDataTypeController overrides. |
| 31 virtual bool ReadyForStart() const OVERRIDE; | 31 virtual bool ReadyForStart() const override; |
| 32 virtual bool StartModels() OVERRIDE; | 32 virtual bool StartModels() override; |
| 33 | 33 |
| 34 // ExtensionRegistryObserver implementation. | 34 // ExtensionRegistryObserver implementation. |
| 35 virtual void OnExtensionLoaded( | 35 virtual void OnExtensionLoaded( |
| 36 content::BrowserContext* browser_context, | 36 content::BrowserContext* browser_context, |
| 37 const extensions::Extension* extension) OVERRIDE; | 37 const extensions::Extension* extension) override; |
| 38 virtual void OnExtensionUnloaded( | 38 virtual void OnExtensionUnloaded( |
| 39 content::BrowserContext* browser_context, | 39 content::BrowserContext* browser_context, |
| 40 const extensions::Extension* extension, | 40 const extensions::Extension* extension, |
| 41 extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE; | 41 extensions::UnloadedExtensionInfo::Reason reason) override; |
| 42 | 42 |
| 43 private: | 43 private: |
| 44 // Refcounted via DataTypeController. | 44 // Refcounted via DataTypeController. |
| 45 virtual ~ExtensionBackedDataTypeController(); | 45 virtual ~ExtensionBackedDataTypeController(); |
| 46 | 46 |
| 47 // Returns whether the extension syncing this type is enabled. | 47 // Returns whether the extension syncing this type is enabled. |
| 48 bool IsSyncingExtensionEnabled() const; | 48 bool IsSyncingExtensionEnabled() const; |
| 49 | 49 |
| 50 // Returns whether |extension|'s id hash matches |extension_hash_|. | 50 // Returns whether |extension|'s id hash matches |extension_hash_|. |
| 51 bool DoesExtensionMatch(const extensions::Extension& extension) const; | 51 bool DoesExtensionMatch(const extensions::Extension& extension) const; |
| 52 | 52 |
| 53 // A hash of the extension id this datatype is dependent on. | 53 // A hash of the extension id this datatype is dependent on. |
| 54 const std::string extension_hash_; | 54 const std::string extension_hash_; |
| 55 | 55 |
| 56 // The owning profile. | 56 // The owning profile. |
| 57 Profile* profile_; | 57 Profile* profile_; |
| 58 | 58 |
| 59 DISALLOW_COPY_AND_ASSIGN(ExtensionBackedDataTypeController); | 59 DISALLOW_COPY_AND_ASSIGN(ExtensionBackedDataTypeController); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace browser_sync | 62 } // namespace browser_sync |
| 63 | 63 |
| 64 #endif // CHROME_BROWSER_SYNC_GLUE_EXTENSION_BACKED_DATA_TYPE_CONTROLLER_H_ | 64 #endif // CHROME_BROWSER_SYNC_GLUE_EXTENSION_BACKED_DATA_TYPE_CONTROLLER_H_ |
| OLD | NEW |