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

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

Issue 223133003: Allow deleting autofill password suggestions on Shift+Delete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed problems in previous patch Created 6 years, 8 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 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 #include "components/autofill/core/browser/autofill_external_delegate.h" 5 #include "components/autofill/core/browser/autofill_external_delegate.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "components/autofill/core/browser/autocomplete_history_manager.h" 8 #include "components/autofill/core/browser/autocomplete_history_manager.h"
9 #include "components/autofill/core/browser/autofill_driver.h" 9 #include "components/autofill/core/browser/autofill_driver.h"
10 #include "components/autofill/core/browser/autofill_manager.h" 10 #include "components/autofill/core/browser/autofill_manager.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 driver_->RendererShouldFillFieldWithValue(value); 193 driver_->RendererShouldFillFieldWithValue(value);
194 } else { 194 } else {
195 FillAutofillFormData(identifier, false); 195 FillAutofillFormData(identifier, false);
196 } 196 }
197 197
198 manager_->delegate()->HideAutofillPopup(); 198 manager_->delegate()->HideAutofillPopup();
199 } 199 }
200 200
201 void AutofillExternalDelegate::RemoveSuggestion(const base::string16& value, 201 void AutofillExternalDelegate::RemoveSuggestion(const base::string16& value,
202 int identifier) { 202 int identifier) {
203 if (identifier > 0) 203 if (identifier > 0) {
204 manager_->RemoveAutofillProfileOrCreditCard(identifier); 204 manager_->RemoveAutofillProfileOrCreditCard(identifier);
205 else 205 } else if (identifier == POPUP_ITEM_ID_PASSWORD_ENTRY) {
206 bool success =
207 password_manager_.RemovePasswordSuggestion(query_field_, value);
208 DCHECK(success);
209 } else {
210 DCHECK(identifier == POPUP_ITEM_ID_AUTOCOMPLETE_ENTRY);
206 manager_->RemoveAutocompleteEntry(query_field_.name, value); 211 manager_->RemoveAutocompleteEntry(query_field_.name, value);
212 }
207 } 213 }
208 214
209 void AutofillExternalDelegate::DidEndTextFieldEditing() { 215 void AutofillExternalDelegate::DidEndTextFieldEditing() {
210 manager_->delegate()->HideAutofillPopup(); 216 manager_->delegate()->HideAutofillPopup();
211 217
212 has_shown_popup_for_current_edit_ = false; 218 has_shown_popup_for_current_edit_ = false;
213 } 219 }
214 220
215 void AutofillExternalDelegate::ClearPreviewedForm() { 221 void AutofillExternalDelegate::ClearPreviewedForm() {
216 driver_->RendererShouldClearPreviewedForm(); 222 driver_->RendererShouldClearPreviewedForm();
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 // Set the values that all datalist elements share. 350 // Set the values that all datalist elements share.
345 icons->insert(icons->begin(), 351 icons->insert(icons->begin(),
346 data_list_values_.size(), 352 data_list_values_.size(),
347 base::string16()); 353 base::string16());
348 unique_ids->insert(unique_ids->begin(), 354 unique_ids->insert(unique_ids->begin(),
349 data_list_values_.size(), 355 data_list_values_.size(),
350 POPUP_ITEM_ID_DATALIST_ENTRY); 356 POPUP_ITEM_ID_DATALIST_ENTRY);
351 } 357 }
352 358
353 } // namespace autofill 359 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_driver.h ('k') | components/autofill/core/browser/autofill_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698