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 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_DEFAULT_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_DEFAULT_H_ |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_DEFAULT_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_DEFAULT_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "chrome/browser/password_manager/login_database.h" | 11 #include "chrome/browser/password_manager/login_database.h" |
12 #include "chrome/browser/password_manager/password_store.h" | 12 #include "chrome/browser/password_manager/password_store.h" |
13 | 13 |
14 class Profile; | 14 class Profile; |
15 | 15 |
16 // Simple password store implementation that delegates everything to | 16 // Simple password store implementation that delegates everything to |
17 // the LoginDatabase. | 17 // the LoginDatabase. |
18 class PasswordStoreDefault : public PasswordStore { | 18 class PasswordStoreDefault : public PasswordStore { |
19 public: | 19 public: |
20 // Takes ownership of |login_db|. | 20 // Takes ownership of |login_db|. |
21 PasswordStoreDefault(LoginDatabase* login_db, | 21 PasswordStoreDefault( |
22 Profile* profile); | 22 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
| 23 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner, |
| 24 LoginDatabase* login_db, |
| 25 Profile* profile); |
23 | 26 |
24 protected: | 27 protected: |
25 virtual ~PasswordStoreDefault(); | 28 virtual ~PasswordStoreDefault(); |
26 | 29 |
27 // Implements RefCountedBrowserContextKeyedService. | 30 // Implements RefCountedBrowserContextKeyedService. |
28 virtual void ShutdownOnUIThread() OVERRIDE; | 31 virtual void ShutdownOnUIThread() OVERRIDE; |
29 | 32 |
30 // Implements PasswordStore interface. | 33 // Implements PasswordStore interface. |
31 virtual void ReportMetricsImpl() OVERRIDE; | 34 virtual void ReportMetricsImpl() OVERRIDE; |
32 virtual void AddLoginImpl(const autofill::PasswordForm& form) OVERRIDE; | 35 virtual void AddLoginImpl(const autofill::PasswordForm& form) OVERRIDE; |
(...skipping 20 matching lines...) Expand all Loading... |
53 } | 56 } |
54 | 57 |
55 private: | 58 private: |
56 scoped_ptr<LoginDatabase> login_db_; | 59 scoped_ptr<LoginDatabase> login_db_; |
57 Profile* profile_; | 60 Profile* profile_; |
58 | 61 |
59 DISALLOW_COPY_AND_ASSIGN(PasswordStoreDefault); | 62 DISALLOW_COPY_AND_ASSIGN(PasswordStoreDefault); |
60 }; | 63 }; |
61 | 64 |
62 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_DEFAULT_H_ | 65 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_DEFAULT_H_ |
OLD | NEW |