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

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

Issue 1001043002: Refactor NavigationState to use NavigationParams (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years, 9 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
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 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 } 1080 }
1081 1081
1082 // Bug fix for crbug.com/368690. isProcessingUserGesture() is false when 1082 // Bug fix for crbug.com/368690. isProcessingUserGesture() is false when
1083 // the user is performing actions outside the page (e.g. typed url, 1083 // the user is performing actions outside the page (e.g. typed url,
1084 // history navigation). We don't want to trigger saving in these cases. 1084 // history navigation). We don't want to trigger saving in these cases.
1085 content::DocumentState* document_state = 1085 content::DocumentState* document_state =
1086 content::DocumentState::FromDataSource( 1086 content::DocumentState::FromDataSource(
1087 navigated_frame->provisionalDataSource()); 1087 navigated_frame->provisionalDataSource());
1088 content::NavigationState* navigation_state = 1088 content::NavigationState* navigation_state =
1089 document_state->navigation_state(); 1089 document_state->navigation_state();
1090 ui::PageTransition type = navigation_state->transition_type(); 1090 ui::PageTransition type = navigation_state->GetTransitionType();
1091 if (ui::PageTransitionIsWebTriggerable(type) && 1091 if (ui::PageTransitionIsWebTriggerable(type) &&
1092 ui::PageTransitionIsNewNavigation(type) && 1092 ui::PageTransitionIsNewNavigation(type) &&
1093 !blink::WebUserGestureIndicator::isProcessingUserGesture()) { 1093 !blink::WebUserGestureIndicator::isProcessingUserGesture()) {
1094 // If onsubmit has been called, try and save that form. 1094 // If onsubmit has been called, try and save that form.
1095 if (provisionally_saved_form_) { 1095 if (provisionally_saved_form_) {
1096 if (logger) { 1096 if (logger) {
1097 logger->LogPasswordForm( 1097 logger->LogPasswordForm(
1098 Logger::STRING_PROVISIONALLY_SAVED_FORM_FOR_FRAME, 1098 Logger::STRING_PROVISIONALLY_SAVED_FORM_FOR_FRAME,
1099 *provisionally_saved_form_); 1099 *provisionally_saved_form_);
1100 } 1100 }
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 void PasswordAutofillAgent::LegacyPasswordAutofillAgent::DidStopLoading() { 1388 void PasswordAutofillAgent::LegacyPasswordAutofillAgent::DidStopLoading() {
1389 agent_->DidStopLoading(); 1389 agent_->DidStopLoading();
1390 } 1390 }
1391 1391
1392 void PasswordAutofillAgent::LegacyPasswordAutofillAgent:: 1392 void PasswordAutofillAgent::LegacyPasswordAutofillAgent::
1393 DidStartProvisionalLoad(blink::WebLocalFrame* navigated_frame) { 1393 DidStartProvisionalLoad(blink::WebLocalFrame* navigated_frame) {
1394 agent_->LegacyDidStartProvisionalLoad(navigated_frame); 1394 agent_->LegacyDidStartProvisionalLoad(navigated_frame);
1395 } 1395 }
1396 1396
1397 } // namespace autofill 1397 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/renderer/safe_browsing/phishing_classifier_delegate.cc ('k') | content/content_renderer.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698