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

Side by Side Diff: chrome/browser/sync/glue/autofill_profile_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: Reffffactor 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_AUTOFILL_PROFILE_DATA_TYPE_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_DATA_TYPE_CONTROLLER_H_
6 #define CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_DATA_TYPE_CONTROLLER_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_DATA_TYPE_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/sync/glue/autofill_data_type_controller.h" 9 #include "base/compiler_specific.h"
10 #include "chrome/browser/sync/profile_sync_factory.h" 10 #include "base/memory/ref_counted.h"
11 #include "chrome/browser/autofill/personal_data_manager_observer.h"
12 #include "chrome/browser/sync/glue/new_non_frontend_data_type_controller.h"
13 #include "content/common/notification_observer.h"
14 #include "content/common/notification_registrar.h"
15
16 class NotificationDetails;
17 class NotificationSource;
18 class PersonalDataManager;
19 class WebDataService;
11 20
12 namespace browser_sync { 21 namespace browser_sync {
13 22
14 class AutofillProfileDataTypeController : public AutofillDataTypeController { 23 class AutofillProfileDataTypeController
24 : public NewNonFrontendDataTypeController,
25 public NotificationObserver,
26 public PersonalDataManagerObserver {
15 public: 27 public:
16 AutofillProfileDataTypeController( 28 AutofillProfileDataTypeController(
17 ProfileSyncFactory* profile_sync_factory, 29 ProfileSyncFactory* profile_sync_factory,
18 Profile* profile); 30 Profile* profile);
19 virtual ~AutofillProfileDataTypeController(); 31 virtual ~AutofillProfileDataTypeController();
20 32
21 virtual syncable::ModelType type() const; 33 // NewNonFrontendDataTypeController implementation.
34 virtual syncable::ModelType type() const OVERRIDE;
35 virtual browser_sync::ModelSafeGroup model_safe_group() const OVERRIDE;
36
37 // NotificationObserver implementation.
38 virtual void Observe(int type,
39 const NotificationSource& source,
40 const NotificationDetails& details) OVERRIDE;
41
42 // PersonalDataManagerObserver implementation:
43 virtual void OnPersonalDataChanged() OVERRIDE;
22 44
23 protected: 45 protected:
24 virtual void CreateSyncComponents(); 46 virtual bool StartModels() OVERRIDE;
akalin 2011/10/11 22:41:08 add comment like NewNonFrontendDataTypeController
Nicolas Zea 2011/10/12 04:24:19 Done.
47 virtual bool StartAssociationAsync() OVERRIDE;
48 virtual WeakHandle<SyncableService> GetWeakHandleToSyncableService()
49 const OVERRIDE;
50 virtual void StopModels() OVERRIDE;
25 virtual void RecordUnrecoverableError( 51 virtual void RecordUnrecoverableError(
26 const tracked_objects::Location& from_here, 52 const tracked_objects::Location& from_here,
27 const std::string& message); 53 const std::string& message) OVERRIDE;
28 virtual void RecordAssociationTime(base::TimeDelta time); 54 virtual void RecordAssociationTime(base::TimeDelta time) OVERRIDE;
29 virtual void RecordStartFailure(StartResult result); 55 virtual void RecordStartFailure(StartResult result) OVERRIDE;
56
57 private:
58 PersonalDataManager* personal_data_;
59 scoped_refptr<WebDataService> web_data_service_;
60 NotificationRegistrar notification_registrar_;
30 }; 61 };
31 62
32 } // namespace browser_sync 63 } // namespace browser_sync
33 64
34 #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_DATA_TYPE_CONTROLLER_H_ 65 #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_DATA_TYPE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698