| OLD | NEW |
| 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 void AutofillAgent::didRequestAutocomplete( | 256 void AutofillAgent::didRequestAutocomplete( |
| 257 const WebFormElement& form) { | 257 const WebFormElement& form) { |
| 258 // Disallow the dialog over non-https or broken https, except when the | 258 // Disallow the dialog over non-https or broken https, except when the |
| 259 // ignore SSL flag is passed. See http://crbug.com/272512. | 259 // ignore SSL flag is passed. See http://crbug.com/272512. |
| 260 // TODO(palmer): this should be moved to the browser process after frames | 260 // TODO(palmer): this should be moved to the browser process after frames |
| 261 // get their own processes. | 261 // get their own processes. |
| 262 GURL url(form.document().url()); | 262 GURL url(form.document().url()); |
| 263 content::SSLStatus ssl_status = | 263 content::SSLStatus ssl_status = |
| 264 render_view()->GetSSLStatusOfFrame(form.document().frame()); | 264 render_view()->GetSSLStatusOfFrame(form.document().frame()); |
| 265 bool is_safe = url.SchemeIs(url::kHttpsScheme) && | 265 bool is_safe = url.SchemeIs(url::kHttpsScheme) && |
| 266 !net::IsCertStatusError(ssl_status.cert_status); | 266 (!net::IsCertStatusError(ssl_status.cert_status) || |
| 267 net::IsCertStatusMinorError(ssl_status.cert_status)); |
| 267 bool allow_unsafe = CommandLine::ForCurrentProcess()->HasSwitch( | 268 bool allow_unsafe = CommandLine::ForCurrentProcess()->HasSwitch( |
| 268 ::switches::kReduceSecurityForTesting); | 269 ::switches::kReduceSecurityForTesting); |
| 269 | 270 |
| 270 FormData form_data; | 271 FormData form_data; |
| 271 std::string error_message; | 272 std::string error_message; |
| 272 if (!in_flight_request_form_.isNull()) { | 273 if (!in_flight_request_form_.isNull()) { |
| 273 error_message = "already active."; | 274 error_message = "already active."; |
| 274 } else if (!is_safe && !allow_unsafe) { | 275 } else if (!is_safe && !allow_unsafe) { |
| 275 error_message = | 276 error_message = |
| 276 "must use a secure connection or --reduce-security-for-testing."; | 277 "must use a secure connection or --reduce-security-for-testing."; |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 // parsed form. | 730 // parsed form. |
| 730 if (frame && !frame->parent() && !frame->isLoading()) { | 731 if (frame && !frame->parent() && !frame->isLoading()) { |
| 731 ProcessForms(*frame); | 732 ProcessForms(*frame); |
| 732 password_autofill_agent_->OnDynamicFormsSeen(frame); | 733 password_autofill_agent_->OnDynamicFormsSeen(frame); |
| 733 return; | 734 return; |
| 734 } | 735 } |
| 735 } | 736 } |
| 736 } | 737 } |
| 737 | 738 |
| 738 } // namespace autofill | 739 } // namespace autofill |
| OLD | NEW |