Popular sites on the NTP: re-download popular suggestions once per Chrome run
[chromium-blink-merge.git] / chrome / browser / password_manager / simple_password_store_mac.h
blobf61e7232de20cfa89e6df057c272474372159357
1 // Copyright 2015 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_SIMPLE_PASSWORD_STORE_MAC_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_SIMPLE_PASSWORD_STORE_MAC_H_
8 #include "components/password_manager/core/browser/password_store_default.h"
10 // The same as PasswordStoreDefault but running on the dedicated thread. The
11 // owner is responsible for the thread lifetime.
12 class SimplePasswordStoreMac : public password_manager::PasswordStoreDefault {
13 public:
14 // Passes the arguments to PasswordStoreDefault. |background_task_runner| and
15 // |login_db| can be overwritten later in InitWithTaskRunner().
16 SimplePasswordStoreMac(
17 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner,
18 scoped_refptr<base::SingleThreadTaskRunner> background_thread_runner,
19 scoped_ptr<password_manager::LoginDatabase> login_db);
21 // Sets the background thread and LoginDatabase. |login_db| should be already
22 // inited. The method isn't necessary to call if the constructor already got
23 // the correct parameters.
24 void InitWithTaskRunner(
25 scoped_refptr<base::SingleThreadTaskRunner> background_task_runner,
26 scoped_ptr<password_manager::LoginDatabase> login_db);
28 using PasswordStoreDefault::GetBackgroundTaskRunner;
30 protected:
31 ~SimplePasswordStoreMac() override;
33 private:
34 bool Init(const syncer::SyncableService::StartSyncFlare& flare) override;
36 DISALLOW_COPY_AND_ASSIGN(SimplePasswordStoreMac);
39 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SIMPLE_PASSWORD_STORE_MAC_H_