| Index: components/safe_browsing_db/v4_store.cc
|
| diff --git a/components/safe_browsing_db/v4_store.cc b/components/safe_browsing_db/v4_store.cc
|
| index 81f30ec7cc066c162c19f28f9f5c048ea9fde9ac..299f6d803ede1deae04d214d9e41c77c6d917d32 100644
|
| --- a/components/safe_browsing_db/v4_store.cc
|
| +++ b/components/safe_browsing_db/v4_store.cc
|
| @@ -194,7 +194,9 @@ V4Store::V4Store(const scoped_refptr<base::SequencedTaskRunner>& task_runner,
|
| const base::FilePath& store_path)
|
| : store_path_(store_path), task_runner_(task_runner) {}
|
|
|
| -V4Store::~V4Store() {}
|
| +V4Store::~V4Store() {
|
| + DCHECK(task_runner_->RunsTasksOnCurrentThread());
|
| +}
|
|
|
| std::string V4Store::DebugString() const {
|
| std::string state_base64;
|
| @@ -204,6 +206,14 @@ std::string V4Store::DebugString() const {
|
| store_path_.value().c_str(), state_base64.c_str());
|
| }
|
|
|
| +// static
|
| +void V4Store::Destroy(std::unique_ptr<V4Store> v4_store) {
|
| + V4Store* v4_store_raw = v4_store.release();
|
| + if (v4_store_raw) {
|
| + v4_store_raw->task_runner_->DeleteSoon(FROM_HERE, v4_store_raw);
|
| + }
|
| +}
|
| +
|
| void V4Store::Reset() {
|
| expected_checksum_.clear();
|
| hash_prefix_map_.clear();
|
|
|