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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "components/password_manager/core/browser/password_store_default.h"
11 class PasswordWebDataService
;
17 namespace password_manager
{
21 // Windows PasswordStore implementation that uses the default implementation,
22 // but also uses IE7 passwords if no others found.
23 class PasswordStoreWin
: public password_manager::PasswordStoreDefault
{
25 // The |login_db| must not have been Init()-ed yet. It will be initialized in
26 // a deferred manner on the DB thread. The |web_data_service| is only used for
27 // IE7 password fetching.
29 scoped_refptr
<base::SingleThreadTaskRunner
> main_thread_runner
,
30 scoped_refptr
<base::SingleThreadTaskRunner
> db_thread_runner
,
31 scoped_ptr
<password_manager::LoginDatabase
> login_db
,
32 const scoped_refptr
<PasswordWebDataService
>& web_data_service
);
35 void Shutdown() override
;
40 ~PasswordStoreWin() override
;
42 // Invoked from Shutdown, but run on the DB thread.
43 void ShutdownOnDBThread();
45 // password_manager::PasswordStore:
46 void GetLoginsImpl(const autofill::PasswordForm
& form
,
47 AuthorizationPromptPolicy prompt_policy
,
48 scoped_ptr
<GetLoginsRequest
> request
) override
;
50 scoped_ptr
<DBHandler
> db_handler_
;
52 DISALLOW_COPY_AND_ASSIGN(PasswordStoreWin
);
55 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_