Chromium Code Reviews| 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 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |