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

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

Issue 2707263003: [Autofill] Fast fix of crashes caused by show-autofill-signatures flag. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | 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 #include "components/autofill/content/renderer/password_autofill_agent.h" 5 #include "components/autofill/content/renderer/password_autofill_agent.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after
1046 // Checks whether the webpage is a redirect page or an empty page. 1046 // Checks whether the webpage is a redirect page or an empty page.
1047 if (form_util::IsWebpageEmpty(frame)) { 1047 if (form_util::IsWebpageEmpty(frame)) {
1048 if (logger) { 1048 if (logger) {
1049 logger->LogMessage(Logger::STRING_WEBPAGE_EMPTY); 1049 logger->LogMessage(Logger::STRING_WEBPAGE_EMPTY);
1050 } 1050 }
1051 return; 1051 return;
1052 } 1052 }
1053 1053
1054 blink::WebVector<blink::WebFormElement> forms; 1054 blink::WebVector<blink::WebFormElement> forms;
1055 frame->document().forms(forms); 1055 frame->document().forms(forms);
1056 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 1056 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
1057 switches::kShowAutofillSignatures)) { 1057 switches::kShowAutofillSignatures)) {
1058 AnnotateFormsWithSignatures(forms); 1058 AnnotateFormsWithSignatures(forms);
1059 } 1059 }
1060 if (logger) 1060 if (logger)
1061 logger->LogNumber(Logger::STRING_NUMBER_OF_ALL_FORMS, forms.size()); 1061 logger->LogNumber(Logger::STRING_NUMBER_OF_ALL_FORMS, forms.size());
1062 1062
1063 std::vector<PasswordForm> password_forms; 1063 std::vector<PasswordForm> password_forms;
1064 for (const blink::WebFormElement& form : forms) { 1064 for (const blink::WebFormElement& form : forms) {
1065 if (only_visible) { 1065 if (only_visible) {
1066 bool is_form_visible = form_util::AreFormContentsVisible(form); 1066 bool is_form_visible = form_util::AreFormContentsVisible(form);
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
1589 PasswordAutofillAgent::GetPasswordManagerDriver() { 1589 PasswordAutofillAgent::GetPasswordManagerDriver() {
1590 if (!password_manager_driver_) { 1590 if (!password_manager_driver_) {
1591 render_frame()->GetRemoteInterfaces()->GetInterface( 1591 render_frame()->GetRemoteInterfaces()->GetInterface(
1592 mojo::MakeRequest(&password_manager_driver_)); 1592 mojo::MakeRequest(&password_manager_driver_));
1593 } 1593 }
1594 1594
1595 return password_manager_driver_; 1595 return password_manager_driver_;
1596 } 1596 }
1597 1597
1598 } // namespace autofill 1598 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698