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 "chrome/browser/password_manager/password_store_win.h" | 5 #include "chrome/browser/password_manager/password_store_win.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 if (ie7_password::DecryptPasswords(url, | 117 if (ie7_password::DecryptPasswords(url, |
118 info.encrypted_data, | 118 info.encrypted_data, |
119 &credentials)) { | 119 &credentials)) { |
120 for (size_t i = 0; i < credentials.size(); ++i) { | 120 for (size_t i = 0; i < credentials.size(); ++i) { |
121 PasswordForm* autofill = new PasswordForm(); | 121 PasswordForm* autofill = new PasswordForm(); |
122 autofill->username_value = credentials[i].username; | 122 autofill->username_value = credentials[i].username; |
123 autofill->password_value = credentials[i].password; | 123 autofill->password_value = credentials[i].password; |
124 autofill->signon_realm = form.signon_realm; | 124 autofill->signon_realm = form.signon_realm; |
125 autofill->origin = form.origin; | 125 autofill->origin = form.origin; |
126 autofill->preferred = true; | 126 autofill->preferred = true; |
127 autofill->ssl_valid = form.origin.SchemeIsSecure(); | 127 autofill->ssl_valid = form.origin.SchemeIsCryptographic(); |
128 autofill->date_created = info.date_created; | 128 autofill->date_created = info.date_created; |
129 | 129 |
130 matched_forms.push_back(autofill); | 130 matched_forms.push_back(autofill); |
131 // Add this PasswordForm to the saved password table. We're on the DB | 131 // Add this PasswordForm to the saved password table. We're on the DB |
132 // thread already, so we use AddLoginImpl. | 132 // thread already, so we use AddLoginImpl. |
133 password_store_->AddLoginImpl(*autofill); | 133 password_store_->AddLoginImpl(*autofill); |
134 } | 134 } |
135 } | 135 } |
136 } | 136 } |
137 return matched_forms.Pass(); | 137 return matched_forms.Pass(); |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 ScopedVector<autofill::PasswordForm> matched_forms( | 207 ScopedVector<autofill::PasswordForm> matched_forms( |
208 FillMatchingLogins(form, prompt_policy)); | 208 FillMatchingLogins(form, prompt_policy)); |
209 if (matched_forms.empty() && db_handler_) { | 209 if (matched_forms.empty() && db_handler_) { |
210 db_handler_->GetIE7Login( | 210 db_handler_->GetIE7Login( |
211 form, base::Bind(&GetLoginsRequest::NotifyConsumerWithResults, | 211 form, base::Bind(&GetLoginsRequest::NotifyConsumerWithResults, |
212 base::Owned(request.release()))); | 212 base::Owned(request.release()))); |
213 } else { | 213 } else { |
214 request->NotifyConsumerWithResults(matched_forms.Pass()); | 214 request->NotifyConsumerWithResults(matched_forms.Pass()); |
215 } | 215 } |
216 } | 216 } |
OLD | NEW |