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

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

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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_CHANGE_PROCESSOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_CHANGE_PROCESSOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_CHANGE_PROCESSOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_CHANGE_PROCESSOR_H_
7 #pragma once 7 #pragma once
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "chrome/browser/autofill/autofill_profile.h" 11 #include "chrome/browser/autofill/autofill_profile.h"
12 #include "chrome/browser/autofill/personal_data_manager.h" 12 #include "chrome/browser/autofill/personal_data_manager.h"
13 #include "chrome/browser/sync/engine/syncapi.h" 13 #include "chrome/browser/sync/engine/syncapi.h"
14 #include "chrome/browser/sync/glue/autofill_profile_model_associator.h" 14 #include "chrome/browser/sync/glue/autofill_profile_model_associator.h"
15 #include "chrome/browser/sync/glue/change_processor.h" 15 #include "chrome/browser/sync/glue/change_processor.h"
16 #include "chrome/browser/sync/unrecoverable_error_handler.h" 16 #include "chrome/browser/sync/unrecoverable_error_handler.h"
17 #include "chrome/browser/webdata/autofill_change.h" 17 #include "chrome/browser/webdata/autofill_change.h"
18 #include "chrome/browser/webdata/web_database.h" 18 #include "chrome/browser/webdata/web_database.h"
19 #include "content/common/content_notification_types.h"
19 #include "content/common/notification_observer.h" 20 #include "content/common/notification_observer.h"
20 #include "content/common/notification_registrar.h" 21 #include "content/common/notification_registrar.h"
21 #include "content/common/notification_service.h" 22 #include "content/common/notification_service.h"
22 #include "content/common/notification_type.h"
23 23
24 namespace browser_sync { 24 namespace browser_sync {
25 25
26 class AutofillProfileChangeProcessor : public ChangeProcessor, 26 class AutofillProfileChangeProcessor : public ChangeProcessor,
27 public NotificationObserver { 27 public NotificationObserver {
28 public: 28 public:
29 AutofillProfileChangeProcessor( 29 AutofillProfileChangeProcessor(
30 AutofillProfileModelAssociator *model_associator, 30 AutofillProfileModelAssociator *model_associator,
31 WebDatabase* web_database, 31 WebDatabase* web_database,
32 PersonalDataManager* personal_data_manager, 32 PersonalDataManager* personal_data_manager,
33 UnrecoverableErrorHandler* error_handler); 33 UnrecoverableErrorHandler* error_handler);
34 34
35 virtual ~AutofillProfileChangeProcessor(); 35 virtual ~AutofillProfileChangeProcessor();
36 36
37 // Virtual methods from ChangeProcessor class. 37 // Virtual methods from ChangeProcessor class.
38 virtual void ApplyChangesFromSyncModel( 38 virtual void ApplyChangesFromSyncModel(
39 const sync_api::BaseTransaction *write_trans, 39 const sync_api::BaseTransaction *write_trans,
40 const sync_api::SyncManager::ChangeRecord* changes, 40 const sync_api::SyncManager::ChangeRecord* changes,
41 int change_count); 41 int change_count);
42 42
43 virtual void CommitChangesFromSyncModel(); 43 virtual void CommitChangesFromSyncModel();
44 44
45 // Virtual method implemented for the observer class. 45 // Virtual method implemented for the observer class.
46 virtual void Observe(NotificationType type, 46 virtual void Observe(int type,
47 const NotificationSource& source, 47 const NotificationSource& source,
48 const NotificationDetails& details); 48 const NotificationDetails& details);
49 49
50 50
51 static void WriteAutofillProfile(const AutofillProfile& profile, 51 static void WriteAutofillProfile(const AutofillProfile& profile,
52 sync_api::WriteNode* node); 52 sync_api::WriteNode* node);
53 53
54 protected: 54 protected:
55 // Protected methods from ChangeProcessor. 55 // Protected methods from ChangeProcessor.
56 virtual void StartImpl(Profile* profile) {} 56 virtual void StartImpl(Profile* profile) {}
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 bool observing_; 99 bool observing_;
100 100
101 WebDatabase* web_database_; 101 WebDatabase* web_database_;
102 PersonalDataManager* personal_data_; 102 PersonalDataManager* personal_data_;
103 NotificationRegistrar notification_registrar_; 103 NotificationRegistrar notification_registrar_;
104 }; 104 };
105 105
106 } // namespace browser_sync 106 } // namespace browser_sync
107 107
108 #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_CHANGE_PROCESSOR_H_ 108 #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_CHANGE_PROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698