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> |
11 | 11 |
12 #include "base/bind.h" | 12 #include "base/bind.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/prefs/pref_service.h" | |
15 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
16 #include "chrome/browser/chrome_notification_types.h" | 15 #include "chrome/browser/chrome_notification_types.h" |
17 #include "components/password_manager/core/browser/password_store_change.h" | 16 #include "components/password_manager/core/browser/password_store_change.h" |
18 #include "components/password_manager/core/common/password_manager_pref_names.h" | 17 #include "components/password_manager/core/common/password_manager_pref_names.h" |
19 #include "components/pref_registry/pref_registry_syncable.h" | 18 #include "components/pref_registry/pref_registry_syncable.h" |
| 19 #include "components/prefs/pref_service.h" |
20 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
21 #include "content/public/browser/notification_service.h" | 21 #include "content/public/browser/notification_service.h" |
22 #include "url/origin.h" | 22 #include "url/origin.h" |
23 | 23 |
24 using autofill::PasswordForm; | 24 using autofill::PasswordForm; |
25 using content::BrowserThread; | 25 using content::BrowserThread; |
26 using password_manager::PasswordStoreChange; | 26 using password_manager::PasswordStoreChange; |
27 using password_manager::PasswordStoreChangeList; | 27 using password_manager::PasswordStoreChangeList; |
28 using password_manager::PasswordStoreDefault; | 28 using password_manager::PasswordStoreDefault; |
29 | 29 |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 // Finally, delete the database file itself. We remove the passwords from | 293 // Finally, delete the database file itself. We remove the passwords from |
294 // it before deleting the file just in case there is some problem deleting | 294 // it before deleting the file just in case there is some problem deleting |
295 // the file (e.g. directory is not writable, but file is), which would | 295 // the file (e.g. directory is not writable, but file is), which would |
296 // otherwise cause passwords to re-migrate next (or maybe every) time. | 296 // otherwise cause passwords to re-migrate next (or maybe every) time. |
297 DeleteAndRecreateDatabaseFile(); | 297 DeleteAndRecreateDatabaseFile(); |
298 } | 298 } |
299 } | 299 } |
300 ssize_t result = ok ? forms.size() : -1; | 300 ssize_t result = ok ? forms.size() : -1; |
301 return result; | 301 return result; |
302 } | 302 } |
OLD | NEW |