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

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
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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 observers_, 694 observers_,
694 OnAutofillDataAvailable(preferred_match.username_value, 695 OnAutofillDataAvailable(preferred_match.username_value,
695 preferred_match.password_value)); 696 preferred_match.password_value));
696 break; 697 break;
697 } 698 }
698 699
699 client_->PasswordWasAutofilled(best_matches); 700 client_->PasswordWasAutofilled(best_matches);
700 } 701 }
701 702
702 } // namespace password_manager 703 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698