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