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

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

Issue 2428803002: Don't send loading completion callbacks for detaching frames. (Closed)
Patch Set: Remove stray include Created 4 years 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.cpp » ('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 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::WebLocalFrame* 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
955 // Make sure that this security origin is allowed to use password manager. 951 // Make sure that this security origin is allowed to use password manager.
956 blink::WebSecurityOrigin origin = frame->document().getSecurityOrigin(); 952 blink::WebSecurityOrigin origin = frame->document().getSecurityOrigin();
957 if (logger) { 953 if (logger) {
958 logger->LogURL(Logger::STRING_SECURITY_ORIGIN, 954 logger->LogURL(Logger::STRING_SECURITY_ORIGIN,
959 GURL(origin.toString().utf8())); 955 GURL(origin.toString().utf8()));
960 } 956 }
961 if (!OriginCanAccessPasswordManager(origin)) { 957 if (!OriginCanAccessPasswordManager(origin)) {
962 if (logger) { 958 if (logger) {
963 logger->LogMessage(Logger::STRING_SECURITY_ORIGIN_FAILURE); 959 logger->LogMessage(Logger::STRING_SECURITY_ORIGIN_FAILURE);
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
1506 PasswordAutofillAgent::GetPasswordManagerDriver() { 1502 PasswordAutofillAgent::GetPasswordManagerDriver() {
1507 if (!password_manager_driver_) { 1503 if (!password_manager_driver_) {
1508 render_frame()->GetRemoteInterfaces()->GetInterface( 1504 render_frame()->GetRemoteInterfaces()->GetInterface(
1509 mojo::GetProxy(&password_manager_driver_)); 1505 mojo::GetProxy(&password_manager_driver_));
1510 } 1506 }
1511 1507
1512 return password_manager_driver_; 1508 return password_manager_driver_;
1513 } 1509 }
1514 1510
1515 } // namespace autofill 1511 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698