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

Side by Side Diff: components/autofill/content/renderer/autofill_agent.cc

Issue 79103002: Abstracted AcceptPasswordAutofillSuggestion IPC out of core Autofill code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review fixes. Created 7 years 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/content/renderer/autofill_agent.h" 5 #include "components/autofill/content/renderer/autofill_agent.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 454
455 void AutofillAgent::OnSetNodeText(const base::string16& value) { 455 void AutofillAgent::OnSetNodeText(const base::string16& value) {
456 SetNodeText(value, &element_); 456 SetNodeText(value, &element_);
457 } 457 }
458 458
459 void AutofillAgent::OnAcceptDataListSuggestion(const base::string16& value) { 459 void AutofillAgent::OnAcceptDataListSuggestion(const base::string16& value) {
460 AcceptDataListSuggestion(value); 460 AcceptDataListSuggestion(value);
461 } 461 }
462 462
463 void AutofillAgent::OnAcceptPasswordAutofillSuggestion( 463 void AutofillAgent::OnAcceptPasswordAutofillSuggestion(
464 const base::string16& value) { 464 const base::string16& username) {
465 // We need to make sure this is handled here because the browser process 465 // We need to make sure this is handled here because the browser process
466 // skipped it handling because it believed it would be handled here. If it 466 // skipped it handling because it believed it would be handled here. If it
467 // isn't handled here then the browser logic needs to be updated. 467 // isn't handled here then the browser logic needs to be updated.
468 bool handled = password_autofill_agent_->DidAcceptAutofillSuggestion( 468 bool handled = password_autofill_agent_->DidAcceptAutofillSuggestion(
469 element_, 469 element_,
470 value); 470 username);
471 DCHECK(handled); 471 DCHECK(handled);
472 } 472 }
473 473
474 void AutofillAgent::OnRequestAutocompleteResult( 474 void AutofillAgent::OnRequestAutocompleteResult(
475 WebFormElement::AutocompleteResult result, const FormData& form_data) { 475 WebFormElement::AutocompleteResult result, const FormData& form_data) {
476 if (in_flight_request_form_.isNull()) 476 if (in_flight_request_form_.isNull())
477 return; 477 return;
478 478
479 if (result == WebFormElement::AutocompleteResultSuccess) { 479 if (result == WebFormElement::AutocompleteResultSuccess) {
480 FillFormIncludingNonFocusableElements(form_data, in_flight_request_form_); 480 FillFormIncludingNonFocusableElements(form_data, in_flight_request_form_);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 // Only monitors dynamic forms created in the top frame. Dynamic forms 615 // Only monitors dynamic forms created in the top frame. Dynamic forms
616 // inserted in iframes are not captured yet. 616 // inserted in iframes are not captured yet.
617 if (!frame->parent()) { 617 if (!frame->parent()) {
618 password_autofill_agent_->OnDynamicFormsSeen(frame); 618 password_autofill_agent_->OnDynamicFormsSeen(frame);
619 return; 619 return;
620 } 620 }
621 } 621 }
622 } 622 }
623 623
624 } // namespace autofill 624 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/content/renderer/autofill_agent.h ('k') | components/autofill/content/renderer/password_autofill_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698