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

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

Issue 2478043002: HTTP Bad: Add warning message to autofill dropdown for http sites (Closed)
Patch Set: advise test Created 4 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
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 // Called when a credit card is scanned using device camera. 94 // Called when a credit card is scanned using device camera.
95 void OnCreditCardScanned(const CreditCard& card); 95 void OnCreditCardScanned(const CreditCard& card);
96 96
97 // Fills the form with the Autofill data corresponding to |unique_id|. 97 // Fills the form with the Autofill data corresponding to |unique_id|.
98 // If |is_preview| is true then this is just a preview to show the user what 98 // If |is_preview| is true then this is just a preview to show the user what
99 // would be selected and if |is_preview| is false then the user has selected 99 // would be selected and if |is_preview| is false then the user has selected
100 // this data. 100 // this data.
101 void FillAutofillFormData(int unique_id, bool is_preview); 101 void FillAutofillFormData(int unique_id, bool is_preview);
102 102
103 // Handle applying any Autofill warnings to the Autofill popup. 103 // Will remove Autofill warnings from |suggestions| if there are also
104 void ApplyAutofillWarnings(std::vector<Suggestion>* suggestions); 104 // autocomplete entries in the vector. Note: at this point, it is assumed that
105 // if there are Autofill warnings, they will be at the head of the vector and
106 // any entry that is not an Autofill warning is considered an Autocomplete
107 // entry.
108 void PossiblyRemoveAutofillWarnings(std::vector<Suggestion>* suggestions);
105 109
106 // Handle applying any Autofill option listings to the Autofill popup. 110 // Handle applying any Autofill option listings to the Autofill popup.
107 // This function should only get called when there is at least one 111 // This function should only get called when there is at least one
108 // multi-field suggestion in the list of suggestions. 112 // multi-field suggestion in the list of suggestions.
109 void ApplyAutofillOptions(std::vector<Suggestion>* suggestions); 113 void ApplyAutofillOptions(std::vector<Suggestion>* suggestions);
110 114
111 // Insert the data list values at the start of the given list, including 115 // Insert the data list values at the start of the given list, including
112 // any required separators. Will also go through |suggestions| and remove 116 // any required separators. Will also go through |suggestions| and remove
113 // duplicate autocomplete (not Autofill) suggestions, keeping their datalist 117 // duplicate autocomplete (not Autofill) suggestions, keeping their datalist
114 // version. 118 // version.
115 void InsertDataListValues(std::vector<Suggestion>* suggestions); 119 void InsertDataListValues(std::vector<Suggestion>* suggestions);
116 120
121 // Returns true if the suggestion entry is an Autofill warning message.
122 // Warning message should display on top of suggestion list.
123 bool IsAutofillWarningEntry(int frontend_id);
Mathieu 2016/11/08 17:26:17 this can be in the anonymous namespace of the cc f
lshang 2016/11/08 23:39:06 Done.
124
117 AutofillManager* manager_; // weak. 125 AutofillManager* manager_; // weak.
118 126
119 // Provides driver-level context to the shared code of the component. Must 127 // Provides driver-level context to the shared code of the component. Must
120 // outlive this object. 128 // outlive this object.
121 AutofillDriver* driver_; // weak 129 AutofillDriver* driver_; // weak
122 130
123 // The ID of the last request sent for form field Autofill. Used to ignore 131 // The ID of the last request sent for form field Autofill. Used to ignore
124 // out of date responses. 132 // out of date responses.
125 int query_id_; 133 int query_id_;
126 134
(...skipping 26 matching lines...) Expand all
153 std::vector<base::string16> data_list_labels_; 161 std::vector<base::string16> data_list_labels_;
154 162
155 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_; 163 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_;
156 164
157 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); 165 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate);
158 }; 166 };
159 167
160 } // namespace autofill 168 } // namespace autofill
161 169
162 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ 170 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698