OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "chrome/browser/sync/glue/generic_change_processor.h" | |
13 #include "chrome/browser/sync/glue/frontend_data_type_controller.h" | 12 #include "chrome/browser/sync/glue/frontend_data_type_controller.h" |
14 #include "content/common/notification_observer.h" | 13 #include "content/common/notification_observer.h" |
15 #include "content/common/notification_registrar.h" | 14 #include "content/common/notification_registrar.h" |
16 | 15 |
17 namespace browser_sync { | 16 namespace browser_sync { |
18 | 17 |
19 class SearchEngineDataTypeController : public FrontendDataTypeController, | 18 class SearchEngineDataTypeController : public FrontendDataTypeController, |
20 public NotificationObserver { | 19 public NotificationObserver { |
21 public: | 20 public: |
22 SearchEngineDataTypeController( | 21 SearchEngineDataTypeController( |
23 ProfileSyncFactory* profile_sync_factory, | 22 ProfileSyncFactory* profile_sync_factory, |
24 Profile* profile, | 23 Profile* profile, |
25 ProfileSyncService* sync_service); | 24 ProfileSyncService* sync_service); |
26 virtual ~SearchEngineDataTypeController(); | 25 virtual ~SearchEngineDataTypeController(); |
27 | 26 |
28 // FrontendDataTypeController implementation. | 27 // FrontendDataTypeController implementation. |
29 virtual syncable::ModelType type() const OVERRIDE; | 28 virtual syncable::ModelType type() const OVERRIDE; |
30 | 29 |
31 // NotificationObserver interface. | 30 // NotificationObserver interface. |
32 virtual void Observe(int type, | 31 virtual void Observe(int type, |
33 const NotificationSource& source, | 32 const NotificationSource& source, |
34 const NotificationDetails& details) OVERRIDE; | 33 const NotificationDetails& details) OVERRIDE; |
35 | 34 |
36 protected: | |
37 virtual GenericChangeProcessor* change_processor() const OVERRIDE; | |
38 | |
39 private: | 35 private: |
40 // FrontendDataTypeController implementations. | 36 // FrontendDataTypeController implementations. |
41 virtual bool StartModels() OVERRIDE; | 37 virtual bool StartModels() OVERRIDE; |
42 virtual void CleanUpState() OVERRIDE; | 38 virtual void CleanUpState() OVERRIDE; |
43 virtual void CreateSyncComponents() OVERRIDE; | 39 virtual void CreateSyncComponents() OVERRIDE; |
44 virtual void RecordUnrecoverableError( | 40 virtual void RecordUnrecoverableError( |
45 const tracked_objects::Location& from_here, | 41 const tracked_objects::Location& from_here, |
46 const std::string& message) OVERRIDE; | 42 const std::string& message) OVERRIDE; |
47 virtual void RecordAssociationTime(base::TimeDelta time) OVERRIDE; | 43 virtual void RecordAssociationTime(base::TimeDelta time) OVERRIDE; |
48 virtual void RecordStartFailure(StartResult result) OVERRIDE; | 44 virtual void RecordStartFailure(StartResult result) OVERRIDE; |
49 | 45 |
50 scoped_ptr<GenericChangeProcessor> generic_change_processor_; | |
51 | |
52 NotificationRegistrar registrar_; | 46 NotificationRegistrar registrar_; |
53 | 47 |
54 DISALLOW_COPY_AND_ASSIGN(SearchEngineDataTypeController); | 48 DISALLOW_COPY_AND_ASSIGN(SearchEngineDataTypeController); |
55 }; | 49 }; |
56 | 50 |
57 } // namespace browser_sync | 51 } // namespace browser_sync |
58 | 52 |
59 #endif // CHROME_BROWSER_SYNC_GLUE_SEARCH_ENGINE_DATA_TYPE_CONTROLLER_H__ | 53 #endif // CHROME_BROWSER_SYNC_GLUE_SEARCH_ENGINE_DATA_TYPE_CONTROLLER_H__ |
OLD | NEW |