Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/login_database.h" | 5 #include "components/password_manager/core/browser/login_database.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1056 | 1056 |
| 1057 // static | 1057 // static |
| 1058 LoginDatabase::EncryptionResult LoginDatabase::InitPasswordFormFromStatement( | 1058 LoginDatabase::EncryptionResult LoginDatabase::InitPasswordFormFromStatement( |
| 1059 PasswordForm* form, | 1059 PasswordForm* form, |
| 1060 sql::Statement& s) { | 1060 sql::Statement& s) { |
| 1061 std::string encrypted_password; | 1061 std::string encrypted_password; |
| 1062 s.ColumnBlobAsString(COLUMN_PASSWORD_VALUE, &encrypted_password); | 1062 s.ColumnBlobAsString(COLUMN_PASSWORD_VALUE, &encrypted_password); |
| 1063 base::string16 decrypted_password; | 1063 base::string16 decrypted_password; |
| 1064 EncryptionResult encryption_result = | 1064 EncryptionResult encryption_result = |
| 1065 DecryptedString(encrypted_password, &decrypted_password); | 1065 DecryptedString(encrypted_password, &decrypted_password); |
| 1066 if (encryption_result != ENCRYPTION_RESULT_SUCCESS) | 1066 if (encryption_result != ENCRYPTION_RESULT_SUCCESS) { |
| 1067 VLOG(0) << "Password decryption failed"; | |
|
vasilii
2016/06/27 13:54:18
Print encryption_result?
vabr (Chromium)
2016/06/27 14:36:39
Good point, done.
| |
| 1067 return encryption_result; | 1068 return encryption_result; |
| 1069 } | |
| 1068 | 1070 |
| 1069 std::string tmp = s.ColumnString(COLUMN_ORIGIN_URL); | 1071 std::string tmp = s.ColumnString(COLUMN_ORIGIN_URL); |
| 1070 form->origin = GURL(tmp); | 1072 form->origin = GURL(tmp); |
| 1071 tmp = s.ColumnString(COLUMN_ACTION_URL); | 1073 tmp = s.ColumnString(COLUMN_ACTION_URL); |
| 1072 form->action = GURL(tmp); | 1074 form->action = GURL(tmp); |
| 1073 form->username_element = s.ColumnString16(COLUMN_USERNAME_ELEMENT); | 1075 form->username_element = s.ColumnString16(COLUMN_USERNAME_ELEMENT); |
| 1074 form->username_value = s.ColumnString16(COLUMN_USERNAME_VALUE); | 1076 form->username_value = s.ColumnString16(COLUMN_USERNAME_VALUE); |
| 1075 form->password_element = s.ColumnString16(COLUMN_PASSWORD_ELEMENT); | 1077 form->password_element = s.ColumnString16(COLUMN_PASSWORD_ELEMENT); |
| 1076 form->password_value = decrypted_password; | 1078 form->password_value = decrypted_password; |
| 1077 form->submit_element = s.ColumnString16(COLUMN_SUBMIT_ELEMENT); | 1079 form->submit_element = s.ColumnString16(COLUMN_SUBMIT_ELEMENT); |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1348 UMA_HISTOGRAM_ENUMERATION("PasswordManager.PslDomainMatchTriggering", | 1350 UMA_HISTOGRAM_ENUMERATION("PasswordManager.PslDomainMatchTriggering", |
| 1349 psl_domain_match_metric, PSL_DOMAIN_MATCH_COUNT); | 1351 psl_domain_match_metric, PSL_DOMAIN_MATCH_COUNT); |
| 1350 } | 1352 } |
| 1351 | 1353 |
| 1352 if (!statement->Succeeded()) | 1354 if (!statement->Succeeded()) |
| 1353 return false; | 1355 return false; |
| 1354 return true; | 1356 return true; |
| 1355 } | 1357 } |
| 1356 | 1358 |
| 1357 } // namespace password_manager | 1359 } // namespace password_manager |
| OLD | NEW |