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 <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 CheckMigration(); | 80 CheckMigration(); |
81 PasswordStoreChangeList changes; | 81 PasswordStoreChangeList changes; |
82 if (use_native_backend() && backend_->RemoveLogin(form, &changes)) { | 82 if (use_native_backend() && backend_->RemoveLogin(form, &changes)) { |
83 allow_fallback_ = false; | 83 allow_fallback_ = false; |
84 } else if (allow_default_store()) { | 84 } else if (allow_default_store()) { |
85 changes = PasswordStoreDefault::RemoveLoginImpl(form); | 85 changes = PasswordStoreDefault::RemoveLoginImpl(form); |
86 } | 86 } |
87 return changes; | 87 return changes; |
88 } | 88 } |
89 | 89 |
| 90 PasswordStoreChangeList PasswordStoreX::RemoveLoginsByOriginAndTimeImpl( |
| 91 const url::Origin& origin, |
| 92 base::Time delete_begin, |
| 93 base::Time delete_end) { |
| 94 CHECK(false) << "not implemented"; |
| 95 return PasswordStoreChangeList(); |
| 96 } |
| 97 |
90 PasswordStoreChangeList PasswordStoreX::RemoveLoginsCreatedBetweenImpl( | 98 PasswordStoreChangeList PasswordStoreX::RemoveLoginsCreatedBetweenImpl( |
91 base::Time delete_begin, | 99 base::Time delete_begin, |
92 base::Time delete_end) { | 100 base::Time delete_end) { |
93 CheckMigration(); | 101 CheckMigration(); |
94 PasswordStoreChangeList changes; | 102 PasswordStoreChangeList changes; |
95 if (use_native_backend() && | 103 if (use_native_backend() && |
96 backend_->RemoveLoginsCreatedBetween( | 104 backend_->RemoveLoginsCreatedBetween( |
97 delete_begin, delete_end, &changes)) { | 105 delete_begin, delete_end, &changes)) { |
98 LogStatsForBulkDeletion(changes.size()); | 106 LogStatsForBulkDeletion(changes.size()); |
99 allow_fallback_ = false; | 107 allow_fallback_ = false; |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 // Finally, delete the database file itself. We remove the passwords from | 259 // Finally, delete the database file itself. We remove the passwords from |
252 // it before deleting the file just in case there is some problem deleting | 260 // it before deleting the file just in case there is some problem deleting |
253 // the file (e.g. directory is not writable, but file is), which would | 261 // the file (e.g. directory is not writable, but file is), which would |
254 // otherwise cause passwords to re-migrate next (or maybe every) time. | 262 // otherwise cause passwords to re-migrate next (or maybe every) time. |
255 DeleteAndRecreateDatabaseFile(); | 263 DeleteAndRecreateDatabaseFile(); |
256 } | 264 } |
257 } | 265 } |
258 ssize_t result = ok ? forms.size() : -1; | 266 ssize_t result = ok ? forms.size() : -1; |
259 return result; | 267 return result; |
260 } | 268 } |
OLD | NEW |