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

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

Issue 2398733004: Do not SendPasswordForms when LocalFrame is being detached (Closed)
Patch Set: Created 4 years, 2 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 | third_party/WebKit/Source/core/loader/FrameLoader.h » ('j') | 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 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
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();
esprehn 2016/10/07 06:55:23 Why do we get here when doing stopAllLoaders? I'd
kojii 2016/10/07 07:03:01 We seem to call didFinishLoad() even when close/ca
vabr (Chromium) 2016/10/07 11:00:48 Just to make sure I understand correctly -- it is
vabr (Chromium) 2016/10/07 11:00:48 +1 to esprehn's concern. The comment at WebFrameCl
kojii 2016/10/07 11:32:44 I'm not very familiar with code outside Blink, but
kojii 2016/10/07 11:45:08 Actually both tkent@ and I +1 too; cancel and clos
950 if (frame->isInStopAllLoaders())
951 return;
952
950 // Make sure that this security origin is allowed to use password manager. 953 // Make sure that this security origin is allowed to use password manager.
951 blink::WebSecurityOrigin origin = frame->document().getSecurityOrigin(); 954 blink::WebSecurityOrigin origin = frame->document().getSecurityOrigin();
952 if (logger) { 955 if (logger) {
953 logger->LogURL(Logger::STRING_SECURITY_ORIGIN, 956 logger->LogURL(Logger::STRING_SECURITY_ORIGIN,
954 GURL(origin.toString().utf8())); 957 GURL(origin.toString().utf8()));
955 } 958 }
956 if (!OriginCanAccessPasswordManager(origin)) { 959 if (!OriginCanAccessPasswordManager(origin)) {
957 if (logger) { 960 if (logger) {
958 logger->LogMessage(Logger::STRING_SECURITY_ORIGIN_FAILURE); 961 logger->LogMessage(Logger::STRING_SECURITY_ORIGIN_FAILURE);
959 } 962 }
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1501 PasswordAutofillAgent::GetPasswordManagerDriver() { 1504 PasswordAutofillAgent::GetPasswordManagerDriver() {
1502 if (!password_manager_driver_) { 1505 if (!password_manager_driver_) {
1503 render_frame()->GetRemoteInterfaces()->GetInterface( 1506 render_frame()->GetRemoteInterfaces()->GetInterface(
1504 mojo::GetProxy(&password_manager_driver_)); 1507 mojo::GetProxy(&password_manager_driver_));
1505 } 1508 }
1506 1509
1507 return password_manager_driver_; 1510 return password_manager_driver_;
1508 } 1511 }
1509 1512
1510 } // namespace autofill 1513 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/FrameLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698