| OLD | NEW |
| 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 #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 #pragma once | 6 #pragma once |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 public: | 43 public: |
| 44 explicit AutocompleteSyncableService(WebDataService* web_data_service); | 44 explicit AutocompleteSyncableService(WebDataService* web_data_service); |
| 45 virtual ~AutocompleteSyncableService(); | 45 virtual ~AutocompleteSyncableService(); |
| 46 | 46 |
| 47 static syncable::ModelType model_type() { return syncable::AUTOFILL; } | 47 static syncable::ModelType model_type() { return syncable::AUTOFILL; } |
| 48 | 48 |
| 49 // SyncableService implementation. | 49 // SyncableService implementation. |
| 50 virtual SyncError MergeDataAndStartSyncing( | 50 virtual SyncError MergeDataAndStartSyncing( |
| 51 syncable::ModelType type, | 51 syncable::ModelType type, |
| 52 const SyncDataList& initial_sync_data, | 52 const SyncDataList& initial_sync_data, |
| 53 SyncChangeProcessor* sync_processor) OVERRIDE; | 53 scoped_ptr<SyncChangeProcessor> sync_processor) OVERRIDE; |
| 54 virtual void StopSyncing(syncable::ModelType type) OVERRIDE; | 54 virtual void StopSyncing(syncable::ModelType type) OVERRIDE; |
| 55 virtual SyncDataList GetAllSyncData(syncable::ModelType type) const OVERRIDE; | 55 virtual SyncDataList GetAllSyncData(syncable::ModelType type) const OVERRIDE; |
| 56 virtual SyncError ProcessSyncChanges( | 56 virtual SyncError ProcessSyncChanges( |
| 57 const tracked_objects::Location& from_here, | 57 const tracked_objects::Location& from_here, |
| 58 const SyncChangeList& change_list) OVERRIDE; | 58 const SyncChangeList& change_list) OVERRIDE; |
| 59 | 59 |
| 60 // NotificationObserver implementation. | 60 // NotificationObserver implementation. |
| 61 virtual void Observe(int type, | 61 virtual void Observe(int type, |
| 62 const content::NotificationSource& source, | 62 const content::NotificationSource& source, |
| 63 const content::NotificationDetails& details) OVERRIDE; | 63 const content::NotificationDetails& details) OVERRIDE; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 content::NotificationRegistrar notification_registrar_; | 124 content::NotificationRegistrar notification_registrar_; |
| 125 | 125 |
| 126 // We receive ownership of |sync_processor_| in MergeDataAndStartSyncing() and | 126 // We receive ownership of |sync_processor_| in MergeDataAndStartSyncing() and |
| 127 // destroy it in StopSyncing(). | 127 // destroy it in StopSyncing(). |
| 128 scoped_ptr<SyncChangeProcessor> sync_processor_; | 128 scoped_ptr<SyncChangeProcessor> sync_processor_; |
| 129 | 129 |
| 130 DISALLOW_COPY_AND_ASSIGN(AutocompleteSyncableService); | 130 DISALLOW_COPY_AND_ASSIGN(AutocompleteSyncableService); |
| 131 }; | 131 }; |
| 132 | 132 |
| 133 #endif // CHROME_BROWSER_WEBDATA_AUTOCOMPLETE_SYNCABLE_SERVICE_H_ | 133 #endif // CHROME_BROWSER_WEBDATA_AUTOCOMPLETE_SYNCABLE_SERVICE_H_ |
| OLD | NEW |