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_WIN_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_ |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/password_manager/password_store_default.h" | 9 #include "chrome/browser/password_manager/password_store_default.h" |
10 | 10 |
11 class LoginDatabase; | 11 class LoginDatabase; |
12 class Profile; | 12 class Profile; |
13 class WebDataService; | 13 class WebDataService; |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 struct PasswordForm; | 16 struct PasswordForm; |
17 } | 17 } |
18 | 18 |
19 // Windows PasswordStore implementation that uses the default implementation, | 19 // Windows PasswordStore implementation that uses the default implementation, |
20 // but also uses IE7 passwords if no others found. | 20 // but also uses IE7 passwords if no others found. |
21 class PasswordStoreWin : public PasswordStoreDefault { | 21 class PasswordStoreWin : public PasswordStoreDefault { |
22 public: | 22 public: |
23 // WebDataService is only used for IE7 password fetching. | 23 // WebDataService is only used for IE7 password fetching. |
24 PasswordStoreWin(LoginDatabase* login_database, | 24 PasswordStoreWin(LoginDatabase* login_database, |
25 Profile* profile, | 25 Profile* profile, |
26 WebDataService* web_data_service); | 26 WebDataService* web_data_service); |
27 | 27 |
28 // RefcountedProfileKeyedService: | 28 // RefcountedBrowserContextKeyedService: |
29 virtual void ShutdownOnUIThread() OVERRIDE; | 29 virtual void ShutdownOnUIThread() OVERRIDE; |
30 | 30 |
31 private: | 31 private: |
32 class DBHandler; | 32 class DBHandler; |
33 | 33 |
34 virtual ~PasswordStoreWin(); | 34 virtual ~PasswordStoreWin(); |
35 | 35 |
36 // Invoked from Shutdown, but run on the DB thread. | 36 // Invoked from Shutdown, but run on the DB thread. |
37 void ShutdownOnDBThread(); | 37 void ShutdownOnDBThread(); |
38 | 38 |
39 virtual void GetLoginsImpl( | 39 virtual void GetLoginsImpl( |
40 const content::PasswordForm& form, | 40 const content::PasswordForm& form, |
41 const ConsumerCallbackRunner& callback_runner) OVERRIDE; | 41 const ConsumerCallbackRunner& callback_runner) OVERRIDE; |
42 | 42 |
43 void GetIE7LoginIfNecessary( | 43 void GetIE7LoginIfNecessary( |
44 const content::PasswordForm& form, | 44 const content::PasswordForm& form, |
45 const ConsumerCallbackRunner& callback_runner, | 45 const ConsumerCallbackRunner& callback_runner, |
46 const std::vector<content::PasswordForm*>& matched_forms); | 46 const std::vector<content::PasswordForm*>& matched_forms); |
47 | 47 |
48 scoped_ptr<DBHandler> db_handler_; | 48 scoped_ptr<DBHandler> db_handler_; |
49 | 49 |
50 DISALLOW_COPY_AND_ASSIGN(PasswordStoreWin); | 50 DISALLOW_COPY_AND_ASSIGN(PasswordStoreWin); |
51 }; | 51 }; |
52 | 52 |
53 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_ | 53 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_ |
OLD | NEW |