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