| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |