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

Side by Side Diff: components/autofill/core/browser/autofill_external_delegate.h

Issue 1458903003: [Autofill] Deduplicate Autocomplete and Datalist suggestions, keeping the latter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 5 years, 1 month 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
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_external_delegate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_AUTOFILL_EXTERNAL_DELEGATE_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 102
103 // Handle applying any Autofill warnings to the Autofill popup. 103 // Handle applying any Autofill warnings to the Autofill popup.
104 void ApplyAutofillWarnings(std::vector<Suggestion>* suggestions); 104 void ApplyAutofillWarnings(std::vector<Suggestion>* suggestions);
105 105
106 // Handle applying any Autofill option listings to the Autofill popup. 106 // Handle applying any Autofill option listings to the Autofill popup.
107 // This function should only get called when there is at least one 107 // This function should only get called when there is at least one
108 // multi-field suggestion in the list of suggestions. 108 // multi-field suggestion in the list of suggestions.
109 void ApplyAutofillOptions(std::vector<Suggestion>* suggestions); 109 void ApplyAutofillOptions(std::vector<Suggestion>* suggestions);
110 110
111 // Insert the data list values at the start of the given list, including 111 // Insert the data list values at the start of the given list, including
112 // any required separators. 112 // any required separators. Will also go through |suggestions| and remove
113 // duplicate autocomplete (not Autofill) suggestions, keeping their datalist
114 // version.
113 void InsertDataListValues(std::vector<Suggestion>* suggestions); 115 void InsertDataListValues(std::vector<Suggestion>* suggestions);
114 116
115 AutofillManager* manager_; // weak. 117 AutofillManager* manager_; // weak.
116 118
117 // Provides driver-level context to the shared code of the component. Must 119 // Provides driver-level context to the shared code of the component. Must
118 // outlive this object. 120 // outlive this object.
119 AutofillDriver* driver_; // weak 121 AutofillDriver* driver_; // weak
120 122
121 // The ID of the last request sent for form field Autofill. Used to ignore 123 // The ID of the last request sent for form field Autofill. Used to ignore
122 // out of date responses. 124 // out of date responses.
(...skipping 25 matching lines...) Expand all
148 std::vector<base::string16> data_list_labels_; 150 std::vector<base::string16> data_list_labels_;
149 151
150 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_; 152 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_;
151 153
152 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); 154 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate);
153 }; 155 };
154 156
155 } // namespace autofill 157 } // namespace autofill
156 158
157 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ 159 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_
OLDNEW
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_external_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698