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

Side by Side Diff: components/autofill/browser/autofill_external_delegate.cc

Issue 15660018: [autofill] Add support for PSL domain matching for password autofill. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed android label with Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "base/strings/utf_string_conversions.h" 5 #include "base/strings/utf_string_conversions.h"
6 #include "components/autofill/browser/autocomplete_history_manager.h" 6 #include "components/autofill/browser/autocomplete_history_manager.h"
7 #include "components/autofill/browser/autofill_external_delegate.h" 7 #include "components/autofill/browser/autofill_external_delegate.h"
8 #include "components/autofill/browser/autofill_manager.h" 8 #include "components/autofill/browser/autofill_manager.h"
9 #include "components/autofill/common/autofill_messages.h" 9 #include "components/autofill/common/autofill_messages.h"
10 #include "content/public/browser/navigation_controller.h" 10 #include "content/public/browser/navigation_controller.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 values, 138 values,
139 labels, 139 labels,
140 icons, 140 icons,
141 ids, 141 ids,
142 GetWeakPtr()); 142 GetWeakPtr());
143 } 143 }
144 } 144 }
145 145
146 void AutofillExternalDelegate::OnShowPasswordSuggestions( 146 void AutofillExternalDelegate::OnShowPasswordSuggestions(
147 const std::vector<base::string16>& suggestions, 147 const std::vector<base::string16>& suggestions,
148 const std::vector<base::string16>& realms,
148 const FormFieldData& field, 149 const FormFieldData& field,
149 const gfx::RectF& element_bounds) { 150 const gfx::RectF& element_bounds) {
150 autofill_query_field_ = field; 151 autofill_query_field_ = field;
151 element_bounds_ = element_bounds; 152 element_bounds_ = element_bounds;
152 153
153 if (suggestions.empty()) { 154 if (suggestions.empty()) {
154 autofill_manager_->delegate()->HideAutofillPopup(); 155 autofill_manager_->delegate()->HideAutofillPopup();
155 return; 156 return;
156 } 157 }
157 158
158 std::vector<base::string16> empty(suggestions.size()); 159 std::vector<base::string16> empty(suggestions.size());
159 std::vector<int> password_ids(suggestions.size(), 160 std::vector<int> password_ids(suggestions.size(),
160 WebAutofillClient::MenuItemIDPasswordEntry); 161 WebAutofillClient::MenuItemIDPasswordEntry);
161 autofill_manager_->delegate()->ShowAutofillPopup( 162 autofill_manager_->delegate()->ShowAutofillPopup(
162 element_bounds_, 163 element_bounds_,
163 autofill_query_field_.text_direction, 164 autofill_query_field_.text_direction,
164 suggestions, 165 suggestions,
165 empty, 166 realms,
166 empty, 167 empty,
167 password_ids, 168 password_ids,
168 GetWeakPtr()); 169 GetWeakPtr());
169 } 170 }
170 171
171 void AutofillExternalDelegate::SetCurrentDataListValues( 172 void AutofillExternalDelegate::SetCurrentDataListValues(
172 const std::vector<base::string16>& data_list_values, 173 const std::vector<base::string16>& data_list_values,
173 const std::vector<base::string16>& data_list_labels, 174 const std::vector<base::string16>& data_list_labels,
174 const std::vector<base::string16>& data_list_icons, 175 const std::vector<base::string16>& data_list_icons,
175 const std::vector<int>& data_list_unique_ids) { 176 const std::vector<int>& data_list_unique_ids) {
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 if (!*content::Details<bool>(details).ptr()) 395 if (!*content::Details<bool>(details).ptr())
395 autofill_manager_->delegate()->HideAutofillPopup(); 396 autofill_manager_->delegate()->HideAutofillPopup();
396 } else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) { 397 } else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
397 autofill_manager_->delegate()->HideAutofillPopup(); 398 autofill_manager_->delegate()->HideAutofillPopup();
398 } else { 399 } else {
399 NOTREACHED(); 400 NOTREACHED();
400 } 401 }
401 } 402 }
402 403
403 } // namespace autofill 404 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698