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

Side by Side Diff: components/password_manager/core/browser/password_manager.cc

Issue 870513002: [PasswordManager] Improve detection of ignorable change password forms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « components/password_manager/core/browser/password_form_manager.cc ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/password_manager/core/browser/password_manager.h" 5 #include "components/password_manager/core/browser/password_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // instances for UMA. 227 // instances for UMA.
228 bool has_found_matching_managers_which_were_not_ready = false; 228 bool has_found_matching_managers_which_were_not_ready = false;
229 for (ScopedVector<PasswordFormManager>::iterator iter = 229 for (ScopedVector<PasswordFormManager>::iterator iter =
230 pending_login_managers_.begin(); 230 pending_login_managers_.begin();
231 iter != pending_login_managers_.end(); ++iter) { 231 iter != pending_login_managers_.end(); ++iter) {
232 PasswordFormManager::MatchResultMask result = (*iter)->DoesManage(form); 232 PasswordFormManager::MatchResultMask result = (*iter)->DoesManage(form);
233 233
234 if (result == PasswordFormManager::RESULT_NO_MATCH) 234 if (result == PasswordFormManager::RESULT_NO_MATCH)
235 continue; 235 continue;
236 236
237 if ((*iter)->IsIgnorableChangePasswordForm()) {
vabr (Chromium) 2015/02/02 14:22:53 Should you also delete the method, which is no lon
Pritam Nikam 2015/02/05 06:12:07 I'm keeping this as a private function.
238 if (logger)
239 logger->LogMessage(Logger::STRING_CHANGE_PASSWORD_FORM);
240 continue;
241 }
242
243 if (!(*iter)->HasCompletedMatching()) { 237 if (!(*iter)->HasCompletedMatching()) {
244 has_found_matching_managers_which_were_not_ready = true; 238 has_found_matching_managers_which_were_not_ready = true;
245 continue; 239 continue;
246 } 240 }
247 241
248 if (result == PasswordFormManager::RESULT_COMPLETE_MATCH) { 242 if (result == PasswordFormManager::RESULT_COMPLETE_MATCH) {
249 // If we find a manager that exactly matches the submitted form including 243 // If we find a manager that exactly matches the submitted form including
250 // the action URL, exit the loop. 244 // the action URL, exit the loop.
251 if (logger) 245 if (logger)
252 logger->LogMessage(Logger::STRING_EXACT_MATCH); 246 logger->LogMessage(Logger::STRING_EXACT_MATCH);
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 observers_, 681 observers_,
688 OnAutofillDataAvailable(preferred_match.username_value, 682 OnAutofillDataAvailable(preferred_match.username_value,
689 preferred_match.password_value)); 683 preferred_match.password_value));
690 break; 684 break;
691 } 685 }
692 686
693 client_->PasswordWasAutofilled(best_matches); 687 client_->PasswordWasAutofilled(best_matches);
694 } 688 }
695 689
696 } // namespace password_manager 690 } // namespace password_manager
OLDNEW
« no previous file with comments | « components/password_manager/core/browser/password_form_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698