| Index: components/gcm_driver/crypto/gcm_key_store.cc
|
| diff --git a/components/gcm_driver/crypto/gcm_key_store.cc b/components/gcm_driver/crypto/gcm_key_store.cc
|
| index d445efe383aa41a9af84f8f3c654631230919293..0086291f35537ed209973c79dee92ac0452b479e 100644
|
| --- a/components/gcm_driver/crypto/gcm_key_store.cc
|
| +++ b/components/gcm_driver/crypto/gcm_key_store.cc
|
| @@ -22,11 +22,11 @@ enum class GCMKeyStore::State {
|
|
|
| GCMKeyStore::GCMKeyStore(
|
| const base::FilePath& key_store_path,
|
| - scoped_refptr<base::SequencedTaskRunner> background_task_runner)
|
| + const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner)
|
| : key_store_path_(key_store_path),
|
| - database_(new leveldb_proto::ProtoDatabaseImpl<EncryptionData>(
|
| - background_task_runner)),
|
| + blocking_task_runner_(blocking_task_runner),
|
| state_(State::UNINITIALIZED) {
|
| + DCHECK(blocking_task_runner);
|
| }
|
|
|
| GCMKeyStore::~GCMKeyStore() {}
|
| @@ -168,6 +168,9 @@ void GCMKeyStore::LazyInitialize(const base::Closure& done_closure) {
|
|
|
| state_ = State::INITIALIZING;
|
|
|
| + database_.reset(new leveldb_proto::ProtoDatabaseImpl<EncryptionData>(
|
| + blocking_task_runner_));
|
| +
|
| database_->Init(key_store_path_,
|
| base::Bind(&GCMKeyStore::DidInitialize, this));
|
| }
|
|
|