| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_SEARCH_ENGINE_DATA_TYPE_CONTROLLER_H__ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_SEARCH_ENGINE_DATA_TYPE_CONTROLLER_H__ |
| 6 #define CHROME_BROWSER_SYNC_GLUE_SEARCH_ENGINE_DATA_TYPE_CONTROLLER_H__ | 6 #define CHROME_BROWSER_SYNC_GLUE_SEARCH_ENGINE_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 "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "components/search_engines/template_url_service.h" | 12 #include "components/search_engines/template_url_service.h" |
| 13 #include "components/sync_driver/generic_change_processor.h" | 13 #include "components/sync_driver/generic_change_processor.h" |
| 14 #include "components/sync_driver/ui_data_type_controller.h" | 14 #include "components/sync_driver/ui_data_type_controller.h" |
| 15 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
| 16 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
| 17 | 17 |
| 18 class Profile; | 18 class Profile; |
| 19 | 19 |
| 20 namespace browser_sync { | 20 namespace browser_sync { |
| 21 | 21 |
| 22 class SearchEngineDataTypeController : public UIDataTypeController { | 22 class SearchEngineDataTypeController |
| 23 : public sync_driver::UIDataTypeController { |
| 23 public: | 24 public: |
| 24 SearchEngineDataTypeController( | 25 SearchEngineDataTypeController( |
| 25 SyncApiComponentFactory* profile_sync_factory, | 26 sync_driver::SyncApiComponentFactory* profile_sync_factory, |
| 26 Profile* profile, | 27 Profile* profile, |
| 27 const DisableTypeCallback& disable_callback); | 28 const DisableTypeCallback& disable_callback); |
| 28 | 29 |
| 29 TemplateURLService::Subscription* GetSubscriptionForTesting(); | 30 TemplateURLService::Subscription* GetSubscriptionForTesting(); |
| 30 | 31 |
| 31 private: | 32 private: |
| 32 virtual ~SearchEngineDataTypeController(); | 33 virtual ~SearchEngineDataTypeController(); |
| 33 | 34 |
| 34 // FrontendDataTypeController implementations. | 35 // FrontendDataTypeController implementations. |
| 35 virtual bool StartModels() OVERRIDE; | 36 virtual bool StartModels() OVERRIDE; |
| 36 virtual void StopModels() OVERRIDE; | 37 virtual void StopModels() OVERRIDE; |
| 37 | 38 |
| 38 void OnTemplateURLServiceLoaded(); | 39 void OnTemplateURLServiceLoaded(); |
| 39 | 40 |
| 40 scoped_ptr<TemplateURLService::Subscription> template_url_subscription_; | 41 scoped_ptr<TemplateURLService::Subscription> template_url_subscription_; |
| 41 Profile* const profile_; | 42 Profile* const profile_; |
| 42 | 43 |
| 43 DISALLOW_COPY_AND_ASSIGN(SearchEngineDataTypeController); | 44 DISALLOW_COPY_AND_ASSIGN(SearchEngineDataTypeController); |
| 44 }; | 45 }; |
| 45 | 46 |
| 46 } // namespace browser_sync | 47 } // namespace browser_sync |
| 47 | 48 |
| 48 #endif // CHROME_BROWSER_SYNC_GLUE_SEARCH_ENGINE_DATA_TYPE_CONTROLLER_H__ | 49 #endif // CHROME_BROWSER_SYNC_GLUE_SEARCH_ENGINE_DATA_TYPE_CONTROLLER_H__ |
| OLD | NEW |