| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 static void CreateForWebDataService( | 51 static void CreateForWebDataService( |
| 52 autofill::AutofillWebDataService* web_data_service); | 52 autofill::AutofillWebDataService* web_data_service); |
| 53 | 53 |
| 54 // Retrieves the AutocompleteSyncableService stored on |web_data|. | 54 // Retrieves the AutocompleteSyncableService stored on |web_data|. |
| 55 static AutocompleteSyncableService* FromWebDataService( | 55 static AutocompleteSyncableService* FromWebDataService( |
| 56 autofill::AutofillWebDataService* web_data_service); | 56 autofill::AutofillWebDataService* web_data_service); |
| 57 | 57 |
| 58 static syncer::ModelType model_type() { return syncer::AUTOFILL; } | 58 static syncer::ModelType model_type() { return syncer::AUTOFILL; } |
| 59 | 59 |
| 60 // syncer::SyncableService implementation. | 60 // syncer::SyncableService implementation. |
| 61 virtual void InjectStartSyncFlare( |
| 62 const syncer::StartSyncFlare& flare) OVERRIDE; |
| 61 virtual syncer::SyncMergeResult MergeDataAndStartSyncing( | 63 virtual syncer::SyncMergeResult MergeDataAndStartSyncing( |
| 62 syncer::ModelType type, | 64 syncer::ModelType type, |
| 63 const syncer::SyncDataList& initial_sync_data, | 65 const syncer::SyncDataList& initial_sync_data, |
| 64 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, | 66 scoped_ptr<syncer::SyncChangeProcessor> sync_processor, |
| 65 scoped_ptr<syncer::SyncErrorFactory> error_handler) OVERRIDE; | 67 scoped_ptr<syncer::SyncErrorFactory> error_handler) OVERRIDE; |
| 66 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; | 68 virtual void StopSyncing(syncer::ModelType type) OVERRIDE; |
| 67 virtual syncer::SyncDataList GetAllSyncData( | 69 virtual syncer::SyncDataList GetAllSyncData( |
| 68 syncer::ModelType type) const OVERRIDE; | 70 syncer::ModelType type) const OVERRIDE; |
| 69 virtual syncer::SyncError ProcessSyncChanges( | 71 virtual syncer::SyncError ProcessSyncChanges( |
| 70 const tracked_objects::Location& from_here, | 72 const tracked_objects::Location& from_here, |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 scoped_ptr<syncer::SyncChangeProcessor> sync_processor_; | 160 scoped_ptr<syncer::SyncChangeProcessor> sync_processor_; |
| 159 | 161 |
| 160 // We receive ownership of |error_handler_| in MergeDataAndStartSyncing() and | 162 // We receive ownership of |error_handler_| in MergeDataAndStartSyncing() and |
| 161 // destroy it in StopSyncing(). | 163 // destroy it in StopSyncing(). |
| 162 scoped_ptr<syncer::SyncErrorFactory> error_handler_; | 164 scoped_ptr<syncer::SyncErrorFactory> error_handler_; |
| 163 | 165 |
| 164 // Whether we should cull expired autofill entries, can be updated by sync | 166 // Whether we should cull expired autofill entries, can be updated by sync |
| 165 // via UpdateCullingSetting. | 167 // via UpdateCullingSetting. |
| 166 bool cull_expired_entries_; | 168 bool cull_expired_entries_; |
| 167 | 169 |
| 170 syncer::StartSyncFlare flare_; |
| 171 |
| 168 DISALLOW_COPY_AND_ASSIGN(AutocompleteSyncableService); | 172 DISALLOW_COPY_AND_ASSIGN(AutocompleteSyncableService); |
| 169 }; | 173 }; |
| 170 | 174 |
| 171 #endif // CHROME_BROWSER_WEBDATA_AUTOCOMPLETE_SYNCABLE_SERVICE_H_ | 175 #endif // CHROME_BROWSER_WEBDATA_AUTOCOMPLETE_SYNCABLE_SERVICE_H_ |
| OLD | NEW |