Commit 86c236fc authored by Anna Malova's avatar Anna Malova Committed by Commit Bot

Convert simple_index to RepeatingClosure

Bug: 1007815
Change-Id: Ie29c204ced96f1975cb5f2c287dfb8a3a6a36325
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2089875Reviewed-by: default avatarMaksim Orlovich <morlovich@chromium.org>
Commit-Queue: Anna Malova <amalova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#747436}
parent e1891a04
......@@ -185,9 +185,9 @@ SimpleIndex::SimpleIndex(
task_runner_(task_runner),
// Creating the callback once so it is reused every time
// write_to_disk_timer_.Start() is called.
write_to_disk_cb_(base::Bind(&SimpleIndex::WriteToDisk,
AsWeakPtr(),
INDEX_WRITE_REASON_IDLE)) {}
write_to_disk_cb_(base::BindRepeating(&SimpleIndex::WriteToDisk,
AsWeakPtr(),
INDEX_WRITE_REASON_IDLE)) {}
SimpleIndex::~SimpleIndex() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
......
......@@ -300,7 +300,7 @@ class NET_EXPORT_PRIVATE SimpleIndex
base::TimeTicks last_write_to_disk_;
base::OneShotTimer write_to_disk_timer_;
base::Closure write_to_disk_cb_;
base::RepeatingClosure write_to_disk_cb_;
typedef std::list<net::CompletionOnceCallback> CallbackList;
CallbackList to_run_when_initialized_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment