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

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

Issue 323423006: Password manager internals page: Add logging for parsed forms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | components/autofill/core/common/save_password_progress_logger.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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 SendPasswordForms(frame, false /* only_visible */); 460 SendPasswordForms(frame, false /* only_visible */);
461 } 461 }
462 462
463 void PasswordAutofillAgent::FirstUserGestureObserved() { 463 void PasswordAutofillAgent::FirstUserGestureObserved() {
464 gatekeeper_.OnUserGesture(); 464 gatekeeper_.OnUserGesture();
465 } 465 }
466 466
467 void PasswordAutofillAgent::SendPasswordForms(blink::WebFrame* frame, 467 void PasswordAutofillAgent::SendPasswordForms(blink::WebFrame* frame,
468 bool only_visible) { 468 bool only_visible) {
469 scoped_ptr<RendererSavePasswordProgressLogger> logger; 469 scoped_ptr<RendererSavePasswordProgressLogger> logger;
470 // From the perspective of saving passwords, only calls with |only_visible| 470 if (logging_state_active_) {
471 // being true are important -- the decision whether to save the password is
472 // only made after visible forms are known, for failed login detection. Calls
473 // with |only_visible| false are important for password form autofill, which
474 // is currently not part of the logging.
475 if (only_visible && logging_state_active_) {
476 logger.reset(new RendererSavePasswordProgressLogger(this, routing_id())); 471 logger.reset(new RendererSavePasswordProgressLogger(this, routing_id()));
477 logger->LogMessage(Logger::STRING_SEND_PASSWORD_FORMS_METHOD); 472 logger->LogMessage(Logger::STRING_SEND_PASSWORD_FORMS_METHOD);
473 logger->LogBoolean(Logger::STRING_ONLY_VISIBLE, only_visible);
478 } 474 }
479 475
480 // Make sure that this security origin is allowed to use password manager. 476 // Make sure that this security origin is allowed to use password manager.
481 blink::WebSecurityOrigin origin = frame->document().securityOrigin(); 477 blink::WebSecurityOrigin origin = frame->document().securityOrigin();
482 if (logger) { 478 if (logger) {
483 logger->LogURL(Logger::STRING_SECURITY_ORIGIN, 479 logger->LogURL(Logger::STRING_SECURITY_ORIGIN,
484 GURL(origin.toString().utf8())); 480 GURL(origin.toString().utf8()));
485 } 481 }
486 if (!OriginCanAccessPasswordManager(origin)) { 482 if (!OriginCanAccessPasswordManager(origin)) {
487 if (logger) { 483 if (logger) {
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 username->setSelectionRange(username_selection_start_, 1066 username->setSelectionRange(username_selection_start_,
1071 username->value().length()); 1067 username->value().length());
1072 } 1068 }
1073 if (!password->suggestedValue().isEmpty()) { 1069 if (!password->suggestedValue().isEmpty()) {
1074 password->setSuggestedValue(blink::WebString()); 1070 password->setSuggestedValue(blink::WebString());
1075 password->setAutofilled(was_password_autofilled_); 1071 password->setAutofilled(was_password_autofilled_);
1076 } 1072 }
1077 } 1073 }
1078 1074
1079 } // namespace autofill 1075 } // namespace autofill
OLDNEW
« no previous file with comments | « no previous file | components/autofill/core/common/save_password_progress_logger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698