| 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/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 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 939 | 939 |
| 940 void PasswordAutofillAgent::SendPasswordForms(bool only_visible) { | 940 void PasswordAutofillAgent::SendPasswordForms(bool only_visible) { |
| 941 std::unique_ptr<RendererSavePasswordProgressLogger> logger; | 941 std::unique_ptr<RendererSavePasswordProgressLogger> logger; |
| 942 if (logging_state_active_) { | 942 if (logging_state_active_) { |
| 943 logger.reset(new RendererSavePasswordProgressLogger( | 943 logger.reset(new RendererSavePasswordProgressLogger( |
| 944 GetPasswordManagerDriver().get())); | 944 GetPasswordManagerDriver().get())); |
| 945 logger->LogMessage(Logger::STRING_SEND_PASSWORD_FORMS_METHOD); | 945 logger->LogMessage(Logger::STRING_SEND_PASSWORD_FORMS_METHOD); |
| 946 logger->LogBoolean(Logger::STRING_ONLY_VISIBLE, only_visible); | 946 logger->LogBoolean(Logger::STRING_ONLY_VISIBLE, only_visible); |
| 947 } | 947 } |
| 948 | 948 |
| 949 blink::WebFrame* frame = render_frame()->GetWebFrame(); | 949 blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); |
| 950 // RenderFrameObserver::DidFinishLoad() can fire when Frame is |
| 951 // detaching. crbug.com/654654 |
| 952 if (frame->isFrameDetachedForSpecialOneOffStopTheCrashingHackBug561873()) |
| 953 return; |
| 954 |
| 950 // Make sure that this security origin is allowed to use password manager. | 955 // Make sure that this security origin is allowed to use password manager. |
| 951 blink::WebSecurityOrigin origin = frame->document().getSecurityOrigin(); | 956 blink::WebSecurityOrigin origin = frame->document().getSecurityOrigin(); |
| 952 if (logger) { | 957 if (logger) { |
| 953 logger->LogURL(Logger::STRING_SECURITY_ORIGIN, | 958 logger->LogURL(Logger::STRING_SECURITY_ORIGIN, |
| 954 GURL(origin.toString().utf8())); | 959 GURL(origin.toString().utf8())); |
| 955 } | 960 } |
| 956 if (!OriginCanAccessPasswordManager(origin)) { | 961 if (!OriginCanAccessPasswordManager(origin)) { |
| 957 if (logger) { | 962 if (logger) { |
| 958 logger->LogMessage(Logger::STRING_SECURITY_ORIGIN_FAILURE); | 963 logger->LogMessage(Logger::STRING_SECURITY_ORIGIN_FAILURE); |
| 959 } | 964 } |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1501 PasswordAutofillAgent::GetPasswordManagerDriver() { | 1506 PasswordAutofillAgent::GetPasswordManagerDriver() { |
| 1502 if (!password_manager_driver_) { | 1507 if (!password_manager_driver_) { |
| 1503 render_frame()->GetRemoteInterfaces()->GetInterface( | 1508 render_frame()->GetRemoteInterfaces()->GetInterface( |
| 1504 mojo::GetProxy(&password_manager_driver_)); | 1509 mojo::GetProxy(&password_manager_driver_)); |
| 1505 } | 1510 } |
| 1506 | 1511 |
| 1507 return password_manager_driver_; | 1512 return password_manager_driver_; |
| 1508 } | 1513 } |
| 1509 | 1514 |
| 1510 } // namespace autofill | 1515 } // namespace autofill |
| OLD | NEW |