Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / password_manager / password_store_win.h
blob00ab273df74d55283010e5c89a611150f777ca88
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;
14 namespace autofill {
15 struct PasswordForm;
18 namespace password_manager {
19 class LoginDatabase;
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 {
25 public:
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.
29 PasswordStoreWin(
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);
35 // PasswordStore:
36 void Shutdown() override;
38 private:
39 class DBHandler;
41 ~PasswordStoreWin() override;
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_