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

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: Incorporated reviews. 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_unittest.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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 // instances for UMA. 229 // instances for UMA.
230 bool has_found_matching_managers_which_were_not_ready = false; 230 bool has_found_matching_managers_which_were_not_ready = false;
231 for (ScopedVector<PasswordFormManager>::iterator iter = 231 for (ScopedVector<PasswordFormManager>::iterator iter =
232 pending_login_managers_.begin(); 232 pending_login_managers_.begin();
233 iter != pending_login_managers_.end(); ++iter) { 233 iter != pending_login_managers_.end(); ++iter) {
234 PasswordFormManager::MatchResultMask result = (*iter)->DoesManage(form); 234 PasswordFormManager::MatchResultMask result = (*iter)->DoesManage(form);
235 235
236 if (result == PasswordFormManager::RESULT_NO_MATCH) 236 if (result == PasswordFormManager::RESULT_NO_MATCH)
237 continue; 237 continue;
238 238
239 if ((*iter)->IsIgnorableChangePasswordForm()) { 239 if ((*iter)->IsIgnorableChangePasswordForm(form.username_value,
240 form.password_value)) {
240 if (logger) 241 if (logger)
241 logger->LogMessage(Logger::STRING_CHANGE_PASSWORD_FORM); 242 logger->LogMessage(Logger::STRING_CHANGE_PASSWORD_FORM);
242 continue; 243 continue;
243 } 244 }
244 245
245 if (!(*iter)->HasCompletedMatching()) { 246 if (!(*iter)->HasCompletedMatching()) {
246 has_found_matching_managers_which_were_not_ready = true; 247 has_found_matching_managers_which_were_not_ready = true;
247 continue; 248 continue;
248 } 249 }
249 250
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 observers_, 696 observers_,
696 OnAutofillDataAvailable(preferred_match.username_value, 697 OnAutofillDataAvailable(preferred_match.username_value,
697 preferred_match.password_value)); 698 preferred_match.password_value));
698 break; 699 break;
699 } 700 }
700 701
701 client_->PasswordWasAutofilled(best_matches); 702 client_->PasswordWasAutofilled(best_matches);
702 } 703 }
703 704
704 } // namespace password_manager 705 } // namespace password_manager
OLDNEW
« no previous file with comments | « components/password_manager/core/browser/password_form_manager_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698