Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Side by Side Diff: chrome/browser/sync/glue/search_engine_data_type_controller.h

Issue 8065016: [Sync] Refactor non-frontend DTC to handle new API properly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and self review Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/frontend_data_type_controller.h" 12 #include "chrome/browser/sync/glue/frontend_data_type_controller.h"
13 #include "chrome/browser/sync/glue/generic_change_processor.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
19 class GenericChangeProcessor;
20
18 class SearchEngineDataTypeController : public FrontendDataTypeController, 21 class SearchEngineDataTypeController : public FrontendDataTypeController,
19 public NotificationObserver { 22 public NotificationObserver {
20 public: 23 public:
21 SearchEngineDataTypeController( 24 SearchEngineDataTypeController(
22 ProfileSyncFactory* profile_sync_factory, 25 ProfileSyncFactory* profile_sync_factory,
23 Profile* profile, 26 Profile* profile,
24 ProfileSyncService* sync_service); 27 ProfileSyncService* sync_service);
25 virtual ~SearchEngineDataTypeController(); 28 virtual ~SearchEngineDataTypeController();
26 29
27 // FrontendDataTypeController implementation. 30 // FrontendDataTypeController implementation.
28 virtual syncable::ModelType type() const OVERRIDE; 31 virtual syncable::ModelType type() const OVERRIDE;
29 32
30 // NotificationObserver interface. 33 // NotificationObserver interface.
31 virtual void Observe(int type, 34 virtual void Observe(int type,
32 const NotificationSource& source, 35 const NotificationSource& source,
33 const NotificationDetails& details) OVERRIDE; 36 const NotificationDetails& details) OVERRIDE;
34 37
38 protected:
39 virtual ChangeProcessor* change_processor() const OVERRIDE;
40
35 private: 41 private:
36 // FrontendDataTypeController implementations. 42 // FrontendDataTypeController implementations.
37 virtual bool StartModels() OVERRIDE; 43 virtual bool StartModels() OVERRIDE;
38 virtual void CleanUpState() OVERRIDE; 44 virtual void CleanUpState() OVERRIDE;
39 virtual void CreateSyncComponents() OVERRIDE; 45 virtual void CreateSyncComponents() OVERRIDE;
40 virtual void RecordUnrecoverableError( 46 virtual void RecordUnrecoverableError(
41 const tracked_objects::Location& from_here, 47 const tracked_objects::Location& from_here,
42 const std::string& message) OVERRIDE; 48 const std::string& message) OVERRIDE;
43 virtual void RecordAssociationTime(base::TimeDelta time) OVERRIDE; 49 virtual void RecordAssociationTime(base::TimeDelta time) OVERRIDE;
44 virtual void RecordStartFailure(StartResult result) OVERRIDE; 50 virtual void RecordStartFailure(StartResult result) OVERRIDE;
45 51
52 scoped_ptr<GenericChangeProcessor> change_processor_;
53
46 NotificationRegistrar registrar_; 54 NotificationRegistrar registrar_;
47 55
48 DISALLOW_COPY_AND_ASSIGN(SearchEngineDataTypeController); 56 DISALLOW_COPY_AND_ASSIGN(SearchEngineDataTypeController);
49 }; 57 };
50 58
51 } // namespace browser_sync 59 } // namespace browser_sync
52 60
53 #endif // CHROME_BROWSER_SYNC_GLUE_SEARCH_ENGINE_DATA_TYPE_CONTROLLER_H__ 61 #endif // CHROME_BROWSER_SYNC_GLUE_SEARCH_ENGINE_DATA_TYPE_CONTROLLER_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698