| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 const blink::WebAutocompleteParams& details) { | 273 const blink::WebAutocompleteParams& details) { |
| 274 // TODO(estade): honor |details|. | 274 // TODO(estade): honor |details|. |
| 275 | 275 |
| 276 // Disallow the dialog over non-https or broken https, except when the | 276 // Disallow the dialog over non-https or broken https, except when the |
| 277 // ignore SSL flag is passed. See http://crbug.com/272512. | 277 // ignore SSL flag is passed. See http://crbug.com/272512. |
| 278 // TODO(palmer): this should be moved to the browser process after frames | 278 // TODO(palmer): this should be moved to the browser process after frames |
| 279 // get their own processes. | 279 // get their own processes. |
| 280 GURL url(form.document().url()); | 280 GURL url(form.document().url()); |
| 281 content::SSLStatus ssl_status = | 281 content::SSLStatus ssl_status = |
| 282 render_view()->GetSSLStatusOfFrame(form.document().frame()); | 282 render_view()->GetSSLStatusOfFrame(form.document().frame()); |
| 283 bool is_safe = url.SchemeIs(content::kHttpsScheme) && | 283 bool is_safe = url.SchemeIs(url::kHttpsScheme) && |
| 284 !net::IsCertStatusError(ssl_status.cert_status); | 284 !net::IsCertStatusError(ssl_status.cert_status); |
| 285 bool allow_unsafe = CommandLine::ForCurrentProcess()->HasSwitch( | 285 bool allow_unsafe = CommandLine::ForCurrentProcess()->HasSwitch( |
| 286 ::switches::kReduceSecurityForTesting); | 286 ::switches::kReduceSecurityForTesting); |
| 287 | 287 |
| 288 FormData form_data; | 288 FormData form_data; |
| 289 std::string error_message; | 289 std::string error_message; |
| 290 if (!in_flight_request_form_.isNull()) { | 290 if (!in_flight_request_form_.isNull()) { |
| 291 error_message = "already active."; | 291 error_message = "already active."; |
| 292 } else if (!is_safe && !allow_unsafe) { | 292 } else if (!is_safe && !allow_unsafe) { |
| 293 error_message = | 293 error_message = |
| (...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 700 // Only monitors dynamic forms created in the top frame. Dynamic forms | 700 // Only monitors dynamic forms created in the top frame. Dynamic forms |
| 701 // inserted in iframes are not captured yet. | 701 // inserted in iframes are not captured yet. |
| 702 if (frame && !frame->parent()) { | 702 if (frame && !frame->parent()) { |
| 703 password_autofill_agent_->OnDynamicFormsSeen(frame); | 703 password_autofill_agent_->OnDynamicFormsSeen(frame); |
| 704 return; | 704 return; |
| 705 } | 705 } |
| 706 } | 706 } |
| 707 } | 707 } |
| 708 | 708 |
| 709 } // namespace autofill | 709 } // namespace autofill |
| OLD | NEW |