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

Side by Side Diff: components/autofill/core/browser/webdata/autocomplete_sync_bridge.h

Issue 2647113002: [Sync] Convert Autocomplete to use sync's report error function. (Closed)
Patch Set: Wrong dep... Created 3 years, 11 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOCOMPLETE_SYNC_BRIDGE_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOCOMPLETE_SYNC_BRIDGE_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOCOMPLETE_SYNC_BRIDGE_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOCOMPLETE_SYNC_BRIDGE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/optional.h" 12 #include "base/optional.h"
13 #include "base/scoped_observer.h" 13 #include "base/scoped_observer.h"
14 #include "base/supports_user_data.h" 14 #include "base/supports_user_data.h"
15 #include "base/threading/non_thread_safe.h" 15 #include "base/threading/non_thread_safe.h"
16 #include "components/autofill/core/browser/webdata/autofill_change.h" 16 #include "components/autofill/core/browser/webdata/autofill_change.h"
17 #include "components/autofill/core/browser/webdata/autofill_webdata_service_obse rver.h" 17 #include "components/autofill/core/browser/webdata/autofill_webdata_service_obse rver.h"
18 #include "components/sync/model/metadata_change_list.h" 18 #include "components/sync/model/metadata_change_list.h"
19 #include "components/sync/model/model_error.h" 19 #include "components/sync/model/model_error.h"
20 #include "components/sync/model/model_type_sync_bridge.h" 20 #include "components/sync/model/model_type_sync_bridge.h"
21 #include "components/version_info/version_info.h"
21 22
22 namespace autofill { 23 namespace autofill {
23 24
24 class AutofillTable; 25 class AutofillTable;
25 class AutofillWebDataBackend; 26 class AutofillWebDataBackend;
26 class AutofillWebDataService; 27 class AutofillWebDataService;
27 28
28 class AutocompleteSyncBridge : public base::SupportsUserData::Data, 29 class AutocompleteSyncBridge : public base::SupportsUserData::Data,
29 public syncer::ModelTypeSyncBridge, 30 public syncer::ModelTypeSyncBridge,
30 public AutofillWebDataServiceObserverOnDBThread { 31 public AutofillWebDataServiceObserverOnDBThread {
31 public: 32 public:
32 AutocompleteSyncBridge(); 33 AutocompleteSyncBridge();
33 AutocompleteSyncBridge( 34 AutocompleteSyncBridge(
34 AutofillWebDataBackend* backend, 35 AutofillWebDataBackend* backend,
35 const ChangeProcessorFactory& change_processor_factory); 36 const ChangeProcessorFactory& change_processor_factory);
36 ~AutocompleteSyncBridge() override; 37 ~AutocompleteSyncBridge() override;
37 38
38 static void CreateForWebDataServiceAndBackend( 39 static void CreateForWebDataServiceAndBackend(
39 AutofillWebDataService* web_data_service, 40 AutofillWebDataService* web_data_service,
40 AutofillWebDataBackend* web_data_backend); 41 AutofillWebDataBackend* web_data_backend,
42 version_info::Channel channel);
41 43
42 static AutocompleteSyncBridge* FromWebDataService( 44 static AutocompleteSyncBridge* FromWebDataService(
43 AutofillWebDataService* web_data_service); 45 AutofillWebDataService* web_data_service);
44 46
45 // syncer::ModelTypeSyncBridge implementation. 47 // syncer::ModelTypeSyncBridge implementation.
46 std::unique_ptr<syncer::MetadataChangeList> CreateMetadataChangeList() 48 std::unique_ptr<syncer::MetadataChangeList> CreateMetadataChangeList()
47 override; 49 override;
48 base::Optional<syncer::ModelError> MergeSyncData( 50 base::Optional<syncer::ModelError> MergeSyncData(
49 std::unique_ptr<syncer::MetadataChangeList> metadata_change_list, 51 std::unique_ptr<syncer::MetadataChangeList> metadata_change_list,
50 syncer::EntityDataMap entity_data_map) override; 52 syncer::EntityDataMap entity_data_map) override;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 88
87 ScopedObserver<AutofillWebDataBackend, AutocompleteSyncBridge> 89 ScopedObserver<AutofillWebDataBackend, AutocompleteSyncBridge>
88 scoped_observer_; 90 scoped_observer_;
89 91
90 DISALLOW_COPY_AND_ASSIGN(AutocompleteSyncBridge); 92 DISALLOW_COPY_AND_ASSIGN(AutocompleteSyncBridge);
91 }; 93 };
92 94
93 } // namespace autofill 95 } // namespace autofill
94 96
95 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOCOMPLETE_SYNC_BRIDGE_H_ 97 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_WEBDATA_AUTOCOMPLETE_SYNC_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698