| 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 autofill { | 15 namespace autofill { |
| 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( |
| 25 Profile* profile, | 25 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
| 26 WebDataService* web_data_service); | 26 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner, |
| 27 LoginDatabase* login_database, |
| 28 Profile* profile, |
| 29 WebDataService* web_data_service); |
| 27 | 30 |
| 28 // RefcountedBrowserContextKeyedService: | 31 // RefcountedBrowserContextKeyedService: |
| 29 virtual void ShutdownOnUIThread() OVERRIDE; | 32 virtual void ShutdownOnUIThread() OVERRIDE; |
| 30 | 33 |
| 31 private: | 34 private: |
| 32 class DBHandler; | 35 class DBHandler; |
| 33 | 36 |
| 34 virtual ~PasswordStoreWin(); | 37 virtual ~PasswordStoreWin(); |
| 35 | 38 |
| 36 // Invoked from Shutdown, but run on the DB thread. | 39 // Invoked from Shutdown, but run on the DB thread. |
| 37 void ShutdownOnDBThread(); | 40 void ShutdownOnDBThread(); |
| 38 | 41 |
| 39 virtual void GetLoginsImpl( | 42 virtual void GetLoginsImpl( |
| 40 const autofill::PasswordForm& form, | 43 const autofill::PasswordForm& form, |
| 41 AuthorizationPromptPolicy prompt_policy, | 44 AuthorizationPromptPolicy prompt_policy, |
| 42 const ConsumerCallbackRunner& callback_runner) OVERRIDE; | 45 const ConsumerCallbackRunner& callback_runner) OVERRIDE; |
| 43 | 46 |
| 44 void GetIE7LoginIfNecessary( | 47 void GetIE7LoginIfNecessary( |
| 45 const autofill::PasswordForm& form, | 48 const autofill::PasswordForm& form, |
| 46 const ConsumerCallbackRunner& callback_runner, | 49 const ConsumerCallbackRunner& callback_runner, |
| 47 const std::vector<autofill::PasswordForm*>& matched_forms); | 50 const std::vector<autofill::PasswordForm*>& matched_forms); |
| 48 | 51 |
| 49 scoped_ptr<DBHandler> db_handler_; | 52 scoped_ptr<DBHandler> db_handler_; |
| 50 | 53 |
| 51 DISALLOW_COPY_AND_ASSIGN(PasswordStoreWin); | 54 DISALLOW_COPY_AND_ASSIGN(PasswordStoreWin); |
| 52 }; | 55 }; |
| 53 | 56 |
| 54 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_ | 57 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_ |
| OLD | NEW |