OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_WEBDATA_AUTOCOMPLETE_SYNCABLE_SERVICE_H_ | 4 #ifndef CHROME_BROWSER_WEBDATA_AUTOCOMPLETE_SYNCABLE_SERVICE_H_ |
5 #define CHROME_BROWSER_WEBDATA_AUTOCOMPLETE_SYNCABLE_SERVICE_H_ | 5 #define CHROME_BROWSER_WEBDATA_AUTOCOMPLETE_SYNCABLE_SERVICE_H_ |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 static AutocompleteSyncableService* FromWebDataService( | 62 static AutocompleteSyncableService* FromWebDataService( |
63 autofill::AutofillWebDataService* web_data_service); | 63 autofill::AutofillWebDataService* web_data_service); |
64 | 64 |
65 static syncer::ModelType model_type() { return syncer::AUTOFILL; } | 65 static syncer::ModelType model_type() { return syncer::AUTOFILL; } |
66 | 66 |
67 // syncer::SyncableService: | 67 // syncer::SyncableService: |
68 virtual syncer::SyncMergeResult MergeDataAndStartSyncing( | 68 virtual syncer::SyncMergeResult MergeDataAndStartSyncing( |
69 syncer::ModelType type, | 69 syncer::ModelType type, |
70 const syncer::SyncDataList& initial_sync_data, | 70 const syncer::SyncDataList& initial_sync_data, |
71 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, | 71 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, |
72 scoped_ptr<syncer::SyncErrorFactory> error_handler) OVERRIDE; | 72 scoped_ptr<syncer::SyncErrorFactory> error_handler) override; |
73 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; | 73 virtual void StopSyncing(syncer::ModelType type) override; |
74 virtual syncer::SyncDataList GetAllSyncData( | 74 virtual syncer::SyncDataList GetAllSyncData( |
75 syncer::ModelType type) const OVERRIDE; | 75 syncer::ModelType type) const override; |
76 virtual syncer::SyncError ProcessSyncChanges( | 76 virtual syncer::SyncError ProcessSyncChanges( |
77 const tracked_objects::Location& from_here, | 77 const tracked_objects::Location& from_here, |
78 const syncer::SyncChangeList& change_list) OVERRIDE; | 78 const syncer::SyncChangeList& change_list) override; |
79 | 79 |
80 // AutofillWebDataServiceObserverOnDBThread: | 80 // AutofillWebDataServiceObserverOnDBThread: |
81 virtual void AutofillEntriesChanged( | 81 virtual void AutofillEntriesChanged( |
82 const autofill::AutofillChangeList& changes) OVERRIDE; | 82 const autofill::AutofillChangeList& changes) override; |
83 | 83 |
84 // Provides a StartSyncFlare to the SyncableService. See sync_start_util for | 84 // Provides a StartSyncFlare to the SyncableService. See sync_start_util for |
85 // more. | 85 // more. |
86 void InjectStartSyncFlare( | 86 void InjectStartSyncFlare( |
87 const syncer::SyncableService::StartSyncFlare& flare); | 87 const syncer::SyncableService::StartSyncFlare& flare); |
88 | 88 |
89 protected: | 89 protected: |
90 explicit AutocompleteSyncableService( | 90 explicit AutocompleteSyncableService( |
91 autofill::AutofillWebDataBackend* web_data_backend); | 91 autofill::AutofillWebDataBackend* web_data_backend); |
92 | 92 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 // We receive ownership of |error_handler_| in MergeDataAndStartSyncing() and | 169 // We receive ownership of |error_handler_| in MergeDataAndStartSyncing() and |
170 // destroy it in StopSyncing(). | 170 // destroy it in StopSyncing(). |
171 scoped_ptr<syncer::SyncErrorFactory> error_handler_; | 171 scoped_ptr<syncer::SyncErrorFactory> error_handler_; |
172 | 172 |
173 syncer::SyncableService::StartSyncFlare flare_; | 173 syncer::SyncableService::StartSyncFlare flare_; |
174 | 174 |
175 DISALLOW_COPY_AND_ASSIGN(AutocompleteSyncableService); | 175 DISALLOW_COPY_AND_ASSIGN(AutocompleteSyncableService); |
176 }; | 176 }; |
177 | 177 |
178 #endif // CHROME_BROWSER_WEBDATA_AUTOCOMPLETE_SYNCABLE_SERVICE_H_ | 178 #endif // CHROME_BROWSER_WEBDATA_AUTOCOMPLETE_SYNCABLE_SERVICE_H_ |
OLD | NEW |