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

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: 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_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 // NewNonFrontendDataTypeController implementation.
47 virtual bool StartModels() OVERRIDE;
48 virtual bool StartAssociationAsync() OVERRIDE;
49 virtual base::WeakPtr<SyncableService> GetWeakPtrToSyncableService()
50 const OVERRIDE;
51 virtual void StopModels() OVERRIDE;
52 virtual void StopLocalServiceAsync() OVERRIDE;
25 virtual void RecordUnrecoverableError( 53 virtual void RecordUnrecoverableError(
26 const tracked_objects::Location& from_here, 54 const tracked_objects::Location& from_here,
27 const std::string& message); 55 const std::string& message) OVERRIDE;
28 virtual void RecordAssociationTime(base::TimeDelta time); 56 virtual void RecordAssociationTime(base::TimeDelta time) OVERRIDE;
29 virtual void RecordStartFailure(StartResult result); 57 virtual void RecordStartFailure(StartResult result) OVERRIDE;
58
59 void DoStartAssociationAsync();
60
61 private:
62 PersonalDataManager* personal_data_;
63 scoped_refptr<WebDataService> web_data_service_;
64 NotificationRegistrar notification_registrar_;
akalin 2011/10/12 19:54:21 add DISALLOW_COPY_AND_ASSIGN
Nicolas Zea 2011/10/12 23:47:43 Done.
30 }; 65 };
31 66
32 } // namespace browser_sync 67 } // namespace browser_sync
33 68
34 #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_DATA_TYPE_CONTROLLER_H_ 69 #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_DATA_TYPE_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698