OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "chrome/browser/password_form_manager.h" | 5 #include "chrome/browser/password_form_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "chrome/browser/ie7_password.h" | 10 #include "chrome/browser/ie7_password.h" |
11 #include "chrome/browser/password_manager.h" | 11 #include "chrome/browser/password_manager.h" |
12 #include "chrome/browser/profile.h" | 12 #include "chrome/browser/profile.h" |
13 #include "webkit/glue/password_form_dom_manager.h" | 13 #include "webkit/glue/password_form_dom_manager.h" |
14 | 14 |
| 15 using base::Time; |
| 16 |
15 PasswordFormManager::PasswordFormManager(Profile* profile, | 17 PasswordFormManager::PasswordFormManager(Profile* profile, |
16 PasswordManager* password_manager, | 18 PasswordManager* password_manager, |
17 const PasswordForm& observed_form, | 19 const PasswordForm& observed_form, |
18 bool ssl_valid) | 20 bool ssl_valid) |
19 : observed_form_(observed_form), | 21 : observed_form_(observed_form), |
20 password_manager_(password_manager), | 22 password_manager_(password_manager), |
21 profile_(profile), | 23 profile_(profile), |
22 is_new_login_(true), | 24 is_new_login_(true), |
23 pending_login_query_(NULL), | 25 pending_login_query_(NULL), |
24 preferred_match_(NULL), | 26 preferred_match_(NULL), |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 score += 1 << 2; | 505 score += 1 << 2; |
504 if (candidate.submit_element == observed_form_.submit_element) | 506 if (candidate.submit_element == observed_form_.submit_element) |
505 score += 1 << 1; | 507 score += 1 << 1; |
506 if (candidate.username_element == observed_form_.username_element) | 508 if (candidate.username_element == observed_form_.username_element) |
507 score += 1 << 0; | 509 score += 1 << 0; |
508 } | 510 } |
509 | 511 |
510 return score; | 512 return score; |
511 } | 513 } |
512 | 514 |
OLD | NEW |