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

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

Issue 902893003: Do not save passwords after back-navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Just rebased Created 5 years, 10 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 | « chrome/test/data/password/dummy_submit.html ('k') | no next file » | 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 } 1075 }
1076 1076
1077 // Bug fix for crbug.com/368690. isProcessingUserGesture() is false when 1077 // Bug fix for crbug.com/368690. isProcessingUserGesture() is false when
1078 // the user is performing actions outside the page (e.g. typed url, 1078 // the user is performing actions outside the page (e.g. typed url,
1079 // history navigation). We don't want to trigger saving in these cases. 1079 // history navigation). We don't want to trigger saving in these cases.
1080 content::DocumentState* document_state = 1080 content::DocumentState* document_state =
1081 content::DocumentState::FromDataSource( 1081 content::DocumentState::FromDataSource(
1082 navigated_frame->provisionalDataSource()); 1082 navigated_frame->provisionalDataSource());
1083 content::NavigationState* navigation_state = 1083 content::NavigationState* navigation_state =
1084 document_state->navigation_state(); 1084 document_state->navigation_state();
1085 if (ui::PageTransitionIsWebTriggerable(navigation_state->transition_type()) && 1085 ui::PageTransition type = navigation_state->transition_type();
1086 if (ui::PageTransitionIsWebTriggerable(type) &&
1087 ui::PageTransitionIsNewNavigation(type) &&
1086 !blink::WebUserGestureIndicator::isProcessingUserGesture()) { 1088 !blink::WebUserGestureIndicator::isProcessingUserGesture()) {
1087 // If onsubmit has been called, try and save that form. 1089 // If onsubmit has been called, try and save that form.
1088 if (provisionally_saved_form_) { 1090 if (provisionally_saved_form_) {
1089 if (logger) { 1091 if (logger) {
1090 logger->LogPasswordForm( 1092 logger->LogPasswordForm(
1091 Logger::STRING_PROVISIONALLY_SAVED_FORM_FOR_FRAME, 1093 Logger::STRING_PROVISIONALLY_SAVED_FORM_FOR_FRAME,
1092 *provisionally_saved_form_); 1094 *provisionally_saved_form_);
1093 } 1095 }
1094 Send(new AutofillHostMsg_PasswordFormSubmitted( 1096 Send(new AutofillHostMsg_PasswordFormSubmitted(
1095 routing_id(), *provisionally_saved_form_)); 1097 routing_id(), *provisionally_saved_form_));
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1379 void PasswordAutofillAgent::LegacyPasswordAutofillAgent::DidStopLoading() { 1381 void PasswordAutofillAgent::LegacyPasswordAutofillAgent::DidStopLoading() {
1380 agent_->DidStopLoading(); 1382 agent_->DidStopLoading();
1381 } 1383 }
1382 1384
1383 void PasswordAutofillAgent::LegacyPasswordAutofillAgent:: 1385 void PasswordAutofillAgent::LegacyPasswordAutofillAgent::
1384 DidStartProvisionalLoad(blink::WebLocalFrame* navigated_frame) { 1386 DidStartProvisionalLoad(blink::WebLocalFrame* navigated_frame) {
1385 agent_->LegacyDidStartProvisionalLoad(navigated_frame); 1387 agent_->LegacyDidStartProvisionalLoad(navigated_frame);
1386 } 1388 }
1387 1389
1388 } // namespace autofill 1390 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/test/data/password/dummy_submit.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698