Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / sync / glue / search_engine_data_type_controller.h
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_SEARCH_ENGINE_DATA_TYPE_CONTROLLER_H__
6 #define CHROME_BROWSER_SYNC_GLUE_SEARCH_ENGINE_DATA_TYPE_CONTROLLER_H__
7
8 #include <string>
9
10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/search_engines/template_url_service.h"
13 #include "chrome/browser/sync/glue/ui_data_type_controller.h"
14 #include "components/sync_driver/generic_change_processor.h"
15 #include "content/public/browser/notification_observer.h"
16 #include "content/public/browser/notification_registrar.h"
17
18 namespace browser_sync {
19
20 class SearchEngineDataTypeController : public UIDataTypeController {
21  public:
22   SearchEngineDataTypeController(
23       ProfileSyncComponentsFactory* profile_sync_factory,
24       Profile* profile,
25       ProfileSyncService* sync_service);
26
27  private:
28   virtual ~SearchEngineDataTypeController();
29
30   // FrontendDataTypeController implementations.
31   virtual bool StartModels() OVERRIDE;
32
33   void OnTemplateURLServiceLoaded();
34
35   scoped_ptr<TemplateURLService::Subscription> template_url_subscription_;
36
37   DISALLOW_COPY_AND_ASSIGN(SearchEngineDataTypeController);
38 };
39
40 }  // namespace browser_sync
41
42 #endif  // CHROME_BROWSER_SYNC_GLUE_SEARCH_ENGINE_DATA_TYPE_CONTROLLER_H__