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

Side by Side Diff: chrome/browser/sync/glue/app_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: Try harder trybot (rebase). 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_APP_DATA_TYPE_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_APP_DATA_TYPE_CONTROLLER_H_
6 #define CHROME_BROWSER_SYNC_GLUE_APP_DATA_TYPE_CONTROLLER_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_APP_DATA_TYPE_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "chrome/browser/sync/glue/frontend_data_type_controller.h" 11 #include "chrome/browser/sync/glue/frontend_data_type_controller.h"
12 12
13 namespace browser_sync { 13 namespace browser_sync {
14 14
15 class GenericChangeProcessor;
akalin 2011/10/12 19:54:21 Apply all comments to this class to the other DTCs
Nicolas Zea 2011/10/12 23:47:43 Done.
16
15 class AppDataTypeController : public FrontendDataTypeController { 17 class AppDataTypeController : public FrontendDataTypeController {
16 public: 18 public:
17 AppDataTypeController( 19 AppDataTypeController(
18 ProfileSyncFactory* profile_sync_factory, 20 ProfileSyncFactory* profile_sync_factory,
19 Profile* profile, 21 Profile* profile,
20 ProfileSyncService* sync_service); 22 ProfileSyncService* sync_service);
21 virtual ~AppDataTypeController(); 23 virtual ~AppDataTypeController();
22 24
23 // DataTypeController implementation. 25 // DataTypeController implementation.
24 virtual syncable::ModelType type() const; 26 virtual syncable::ModelType type() const;
25 27
28 protected:
29 virtual ChangeProcessor* change_processor() const OVERRIDE;
akalin 2011/10/12 19:54:21 may as well have this return GenericChangeProcesso
Nicolas Zea 2011/10/12 23:47:43 Done.
30
26 private: 31 private:
27 // DataTypeController implementations. 32 // DataTypeController implementations.
28 virtual bool StartModels(); 33 virtual bool StartModels();
29 virtual void CreateSyncComponents(); 34 virtual void CreateSyncComponents();
30 virtual void RecordUnrecoverableError( 35 virtual void RecordUnrecoverableError(
31 const tracked_objects::Location& from_here, 36 const tracked_objects::Location& from_here,
32 const std::string& message); 37 const std::string& message);
33 virtual void RecordAssociationTime(base::TimeDelta time); 38 virtual void RecordAssociationTime(base::TimeDelta time);
34 virtual void RecordStartFailure(StartResult result); 39 virtual void RecordStartFailure(StartResult result);
35 40
41 scoped_ptr<GenericChangeProcessor> change_processor_;
akalin 2011/10/12 19:54:21 wait, doesn't this shadow change_processor_ in Fro
Nicolas Zea 2011/10/12 23:47:43 It does, but we can't get rid of it in FrontendDTC
akalin 2011/10/13 00:08:16 I see. Can you rename it so that it's not confusi
42
36 DISALLOW_COPY_AND_ASSIGN(AppDataTypeController); 43 DISALLOW_COPY_AND_ASSIGN(AppDataTypeController);
37 }; 44 };
38 45
39 } // namespace browser_sync 46 } // namespace browser_sync
40 47
41 #endif // CHROME_BROWSER_SYNC_GLUE_APP_DATA_TYPE_CONTROLLER_H_ 48 #endif // CHROME_BROWSER_SYNC_GLUE_APP_DATA_TYPE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698