Chromium Code Reviews| 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..8e9c005e41141157e536f938d1139c82612f3bc9 100644 |
| --- a/components/gcm_driver/crypto/gcm_key_store.cc |
| +++ b/components/gcm_driver/crypto/gcm_key_store.cc |
| @@ -22,10 +22,9 @@ enum class GCMKeyStore::State { |
| GCMKeyStore::GCMKeyStore( |
| const base::FilePath& key_store_path, |
| - scoped_refptr<base::SequencedTaskRunner> background_task_runner) |
| + 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) { |
| } |
| @@ -168,6 +167,10 @@ void GCMKeyStore::LazyInitialize(const base::Closure& done_closure) { |
| state_ = State::INITIALIZING; |
| + DCHECK(blocking_task_runner_); |
|
jianli
2015/07/17 20:55:21
This DCHECK should be moved to constructor.
Peter Beverloo
2015/07/20 17:55:53
Done.
|
| + database_.reset(new leveldb_proto::ProtoDatabaseImpl<EncryptionData>( |
| + blocking_task_runner_)); |
| + |
| database_->Init(key_store_path_, |
| base::Bind(&GCMKeyStore::DidInitialize, this)); |
| } |