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_x.h" | 5 #include "chrome/browser/password_manager/password_store_x.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // until we perform a write operation, or until a read returns actual data. | 200 // until we perform a write operation, or until a read returns actual data. |
201 if (!matched_forms.empty()) | 201 if (!matched_forms.empty()) |
202 allow_fallback_ = false; | 202 allow_fallback_ = false; |
203 return matched_forms; | 203 return matched_forms; |
204 } | 204 } |
205 if (allow_default_store()) | 205 if (allow_default_store()) |
206 return PasswordStoreDefault::FillMatchingLogins(form); | 206 return PasswordStoreDefault::FillMatchingLogins(form); |
207 return std::vector<std::unique_ptr<PasswordForm>>(); | 207 return std::vector<std::unique_ptr<PasswordForm>>(); |
208 } | 208 } |
209 | 209 |
| 210 std::vector<std::unique_ptr<PasswordForm>> |
| 211 PasswordStoreX::FillLoginsForSameOrganizationName( |
| 212 const std::string& signon_realm) { |
| 213 // Not available on X. |
| 214 return std::vector<std::unique_ptr<PasswordForm>>(); |
| 215 } |
| 216 |
210 bool PasswordStoreX::FillAutofillableLogins( | 217 bool PasswordStoreX::FillAutofillableLogins( |
211 std::vector<std::unique_ptr<PasswordForm>>* forms) { | 218 std::vector<std::unique_ptr<PasswordForm>>* forms) { |
212 CheckMigration(); | 219 CheckMigration(); |
213 if (use_native_backend() && backend_->GetAutofillableLogins(forms)) { | 220 if (use_native_backend() && backend_->GetAutofillableLogins(forms)) { |
214 SortLoginsByOrigin(forms); | 221 SortLoginsByOrigin(forms); |
215 // See GetLoginsImpl() for why we disallow fallback conditionally here. | 222 // See GetLoginsImpl() for why we disallow fallback conditionally here. |
216 if (!forms->empty()) | 223 if (!forms->empty()) |
217 allow_fallback_ = false; | 224 allow_fallback_ = false; |
218 return true; | 225 return true; |
219 } | 226 } |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 // Finally, delete the database file itself. We remove the passwords from | 312 // Finally, delete the database file itself. We remove the passwords from |
306 // it before deleting the file just in case there is some problem deleting | 313 // it before deleting the file just in case there is some problem deleting |
307 // the file (e.g. directory is not writable, but file is), which would | 314 // the file (e.g. directory is not writable, but file is), which would |
308 // otherwise cause passwords to re-migrate next (or maybe every) time. | 315 // otherwise cause passwords to re-migrate next (or maybe every) time. |
309 DeleteAndRecreateDatabaseFile(); | 316 DeleteAndRecreateDatabaseFile(); |
310 } | 317 } |
311 } | 318 } |
312 ssize_t result = ok ? forms.size() : -1; | 319 ssize_t result = ok ? forms.size() : -1; |
313 return result; | 320 return result; |
314 } | 321 } |
OLD | NEW |