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 <vector> | 11 #include <vector> |
11 | 12 |
12 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
14 #include "base/threading/non_thread_safe.h" | 15 #include "base/threading/non_thread_safe.h" |
15 #include "chrome/browser/sync/api/sync_change.h" | 16 #include "chrome/browser/sync/api/sync_change.h" |
16 #include "chrome/browser/sync/api/sync_data.h" | 17 #include "chrome/browser/sync/api/sync_data.h" |
17 #include "chrome/browser/sync/api/sync_error.h" | 18 #include "chrome/browser/sync/api/sync_error.h" |
18 #include "chrome/browser/sync/api/syncable_service.h" | 19 #include "chrome/browser/sync/api/syncable_service.h" |
19 #include "chrome/browser/webdata/autofill_change.h" | 20 #include "chrome/browser/webdata/autofill_change.h" |
20 #include "chrome/browser/webdata/autofill_entry.h" | 21 #include "chrome/browser/webdata/autofill_entry.h" |
21 #include "chrome/browser/webdata/web_data_service.h" | 22 #include "chrome/browser/webdata/web_data_service.h" |
22 #include "content/public/browser/notification_observer.h" | 23 #include "content/public/browser/notification_observer.h" |
23 #include "content/public/browser/notification_registrar.h" | 24 #include "content/public/browser/notification_registrar.h" |
24 | 25 |
25 class ProfileSyncServiceAutofillTest; | 26 class ProfileSyncServiceAutofillTest; |
26 | 27 |
27 namespace browser_sync { | |
28 class UnrecoverableErrorHandler; | |
29 } | |
30 | |
31 namespace sync_pb { | 28 namespace sync_pb { |
32 class AutofillSpecifics; | 29 class AutofillSpecifics; |
33 } | 30 } |
34 | 31 |
35 | 32 |
36 // The sync implementation for autocomplete. | 33 // The sync implementation for autocomplete. |
37 // MergeDataAndStartSyncing() called first, it does cloud->local and | 34 // MergeDataAndStartSyncing() called first, it does cloud->local and |
38 // local->cloud syncs. Then for each cloud change we receive | 35 // local->cloud syncs. Then for each cloud change we receive |
39 // ProcessSyncChanges() and for each local change Observe() is called. | 36 // ProcessSyncChanges() and for each local change Observe() is called. |
40 // TODO(georgey) : remove reliance on the notifications and make it to be called | 37 // TODO(georgey) : remove reliance on the notifications and make it to be called |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 content::NotificationRegistrar notification_registrar_; | 124 content::NotificationRegistrar notification_registrar_; |
128 | 125 |
129 // We receive ownership of |sync_processor_| in MergeDataAndStartSyncing() and | 126 // We receive ownership of |sync_processor_| in MergeDataAndStartSyncing() and |
130 // destroy it in StopSyncing(). | 127 // destroy it in StopSyncing(). |
131 scoped_ptr<SyncChangeProcessor> sync_processor_; | 128 scoped_ptr<SyncChangeProcessor> sync_processor_; |
132 | 129 |
133 DISALLOW_COPY_AND_ASSIGN(AutocompleteSyncableService); | 130 DISALLOW_COPY_AND_ASSIGN(AutocompleteSyncableService); |
134 }; | 131 }; |
135 | 132 |
136 #endif // CHROME_BROWSER_WEBDATA_AUTOCOMPLETE_SYNCABLE_SERVICE_H_ | 133 #endif // CHROME_BROWSER_WEBDATA_AUTOCOMPLETE_SYNCABLE_SERVICE_H_ |
OLD | NEW |