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 webkit { | 15 namespace content { |
16 namespace forms { | |
17 struct PasswordForm; | 16 struct PasswordForm; |
18 } | 17 } |
19 } | |
20 | 18 |
21 // Windows PasswordStore implementation that uses the default implementation, | 19 // Windows PasswordStore implementation that uses the default implementation, |
22 // but also uses IE7 passwords if no others found. | 20 // but also uses IE7 passwords if no others found. |
23 class PasswordStoreWin : public PasswordStoreDefault { | 21 class PasswordStoreWin : public PasswordStoreDefault { |
24 public: | 22 public: |
25 // WebDataService is only used for IE7 password fetching. | 23 // WebDataService is only used for IE7 password fetching. |
26 PasswordStoreWin(LoginDatabase* login_database, | 24 PasswordStoreWin(LoginDatabase* login_database, |
27 Profile* profile, | 25 Profile* profile, |
28 WebDataService* web_data_service); | 26 WebDataService* web_data_service); |
29 | 27 |
30 // RefcountedProfileKeyedService: | 28 // RefcountedProfileKeyedService: |
31 virtual void ShutdownOnUIThread() OVERRIDE; | 29 virtual void ShutdownOnUIThread() OVERRIDE; |
32 | 30 |
33 private: | 31 private: |
34 class DBHandler; | 32 class DBHandler; |
35 | 33 |
36 virtual ~PasswordStoreWin(); | 34 virtual ~PasswordStoreWin(); |
37 | 35 |
38 // Invoked from Shutdown, but run on the DB thread. | 36 // Invoked from Shutdown, but run on the DB thread. |
39 void ShutdownOnDBThread(); | 37 void ShutdownOnDBThread(); |
40 | 38 |
41 virtual GetLoginsRequest* NewGetLoginsRequest( | 39 virtual GetLoginsRequest* NewGetLoginsRequest( |
42 const GetLoginsCallback& callback) OVERRIDE; | 40 const GetLoginsCallback& callback) OVERRIDE; |
43 | 41 |
44 // See PasswordStoreDefault. | 42 // See PasswordStoreDefault. |
45 virtual void ForwardLoginsResult(GetLoginsRequest* request) OVERRIDE; | 43 virtual void ForwardLoginsResult(GetLoginsRequest* request) OVERRIDE; |
46 | 44 |
47 // Overridden so that we can save the form for later use. | 45 // Overridden so that we can save the form for later use. |
48 virtual void GetLoginsImpl(GetLoginsRequest* request, | 46 virtual void GetLoginsImpl(GetLoginsRequest* request, |
49 const webkit::forms::PasswordForm& form) OVERRIDE; | 47 const content::PasswordForm& form) OVERRIDE; |
50 | 48 |
51 scoped_ptr<DBHandler> db_handler_; | 49 scoped_ptr<DBHandler> db_handler_; |
52 | 50 |
53 DISALLOW_COPY_AND_ASSIGN(PasswordStoreWin); | 51 DISALLOW_COPY_AND_ASSIGN(PasswordStoreWin); |
54 }; | 52 }; |
55 | 53 |
56 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_ | 54 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_ |
OLD | NEW |