Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_SIMPLE_PASSWORD_STORE_MAC_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_SIMPLE_PASSWORD_STORE_MAC_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_SIMPLE_PASSWORD_STORE_MAC_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_SIMPLE_PASSWORD_STORE_MAC_H_ |
| 7 | 7 |
| 8 #include "components/password_manager/core/browser/password_store_default.h" | 8 #include "components/password_manager/core/browser/password_store_default.h" |
| 9 | 9 |
| 10 // The same as PasswordStoreDefault but running on the dedicated thread. The | 10 // The same as PasswordStoreDefault but running on the dedicated thread. The |
| 11 // owner is responsible for the thread lifetime. | 11 // owner is responsible for the thread lifetime. |
| 12 class SimplePasswordStoreMac : public password_manager::PasswordStoreDefault { | 12 class SimplePasswordStoreMac : public password_manager::PasswordStoreDefault { |
| 13 public: | 13 public: |
| 14 SimplePasswordStoreMac( | 14 SimplePasswordStoreMac( |
| 15 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner, | 15 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner, |
| 16 scoped_refptr<base::SingleThreadTaskRunner> background_thread_runner, | 16 scoped_refptr<base::SingleThreadTaskRunner> background_thread_runner, |
|
vabr (Chromium)
2015/07/03 08:40:48
nit: Passing of background runners both in the con
vasilii
2015/07/03 12:59:11
Done. I use both null and non-null calls.
| |
| 17 scoped_ptr<password_manager::LoginDatabase> login_db); | 17 scoped_ptr<password_manager::LoginDatabase> login_db); |
| 18 | 18 |
| 19 // Just hides the parent method. All the initialization is to be done by | 19 // Sets the background thread and LoginDatabase. |login_db| should be already |
| 20 // PasswordStoreProxyMac that is an owner of the class. | 20 // inited. |
| 21 bool Init(const syncer::SyncableService::StartSyncFlare& flare) override; | 21 void InitWithTaskRunner( |
| 22 scoped_refptr<base::SingleThreadTaskRunner> background_task_runner, | |
| 23 scoped_ptr<password_manager::LoginDatabase> login_db); | |
| 22 | 24 |
| 23 // Clean |background_thread_runner_|. | 25 // Clean |background_thread_runner_|. |
| 24 void Shutdown() override; | 26 void Shutdown() override; |
| 25 | 27 |
| 26 using PasswordStoreDefault::GetBackgroundTaskRunner; | 28 using PasswordStoreDefault::GetBackgroundTaskRunner; |
| 27 | 29 |
| 28 protected: | 30 protected: |
| 29 ~SimplePasswordStoreMac() override; | 31 ~SimplePasswordStoreMac() override; |
| 30 | 32 |
| 31 private: | 33 private: |
| 34 using PasswordStoreDefault::Init; | |
|
vabr (Chromium)
2015/07/03 08:40:48
Please remind me: where is this called from?
vasilii
2015/07/03 12:59:11
It's not called, that's why it's private.
vabr (Chromium)
2015/07/06 09:50:19
Fair enough. But if you want to avoid people calli
vasilii
2015/07/06 13:57:57
Done.
| |
| 35 | |
| 32 DISALLOW_COPY_AND_ASSIGN(SimplePasswordStoreMac); | 36 DISALLOW_COPY_AND_ASSIGN(SimplePasswordStoreMac); |
| 33 }; | 37 }; |
| 34 | 38 |
| 35 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SIMPLE_PASSWORD_STORE_MAC_H_ | 39 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SIMPLE_PASSWORD_STORE_MAC_H_ |
| OLD | NEW |