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 "base/memory/scoped_vector.h"
10 #include "components/password_manager/core/browser/password_store_default.h"
12 class PasswordWebDataService
;
18 namespace password_manager
{
22 // Windows PasswordStore implementation that uses the default implementation,
23 // but also uses IE7 passwords if no others found.
24 class PasswordStoreWin
: public password_manager::PasswordStoreDefault
{
26 // The |login_db| must not have been Init()-ed yet. It will be initialized in
27 // a deferred manner on the DB thread. The |web_data_service| is only used for
28 // IE7 password fetching.
30 scoped_refptr
<base::SingleThreadTaskRunner
> main_thread_runner
,
31 scoped_refptr
<base::SingleThreadTaskRunner
> db_thread_runner
,
32 scoped_ptr
<password_manager::LoginDatabase
> login_db
,
33 const scoped_refptr
<PasswordWebDataService
>& web_data_service
);
36 virtual void Shutdown() override
;
41 virtual ~PasswordStoreWin();
43 // Invoked from Shutdown, but run on the DB thread.
44 void ShutdownOnDBThread();
46 // password_manager::PasswordStore:
47 void GetLoginsImpl(const autofill::PasswordForm
& form
,
48 AuthorizationPromptPolicy prompt_policy
,
49 scoped_ptr
<GetLoginsRequest
> request
) override
;
51 scoped_ptr
<DBHandler
> db_handler_
;
53 DISALLOW_COPY_AND_ASSIGN(PasswordStoreWin
);
56 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_WIN_H_