Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(783)

Unified Diff: components/safe_browsing_db/v4_database.cc

Issue 2375663002: Replace MessageLoop::current()->task_runner() with ThreadTaskRunnerHandle::Get(). (Closed)
Patch Set: rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/safe_browsing_db/v4_database.cc
diff --git a/components/safe_browsing_db/v4_database.cc b/components/safe_browsing_db/v4_database.cc
index efcbe7b1aaa5eea6e23df6f255b8055e8add198c..6e14e5f099dfeee935a8f5265357fddf71719192 100644
--- a/components/safe_browsing_db/v4_database.cc
+++ b/components/safe_browsing_db/v4_database.cc
@@ -8,7 +8,7 @@
#include "base/debug/leak_annotations.h"
#include "base/files/file_util.h"
#include "base/memory/ptr_util.h"
-#include "base/message_loop/message_loop.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "components/safe_browsing_db/v4_database.h"
#include "content/public/browser/browser_thread.h"
@@ -28,8 +28,8 @@ void V4Database::Create(
DCHECK(base_path.IsAbsolute());
DCHECK(!list_infos.empty());
- const scoped_refptr<base::SingleThreadTaskRunner>& callback_task_runner =
- base::MessageLoop::current()->task_runner();
+ const scoped_refptr<base::SingleThreadTaskRunner> callback_task_runner =
+ base::ThreadTaskRunnerHandle::Get();
db_task_runner->PostTask(
FROM_HERE,
base::Bind(&V4Database::CreateOnTaskRunner, db_task_runner, base_path,
@@ -107,8 +107,8 @@ void V4Database::ApplyUpdate(
// Post the V4Store update task on the task runner but get the callback on the
// current thread.
- const scoped_refptr<base::SingleThreadTaskRunner>& current_task_runner =
- base::MessageLoop::current()->task_runner();
+ const scoped_refptr<base::SingleThreadTaskRunner> current_task_runner =
+ base::ThreadTaskRunnerHandle::Get();
for (std::unique_ptr<ListUpdateResponse>& response :
*parsed_server_response) {
ListIdentifier identifier(*response);
« no previous file with comments | « components/previews/core/previews_black_list_unittest.cc ('k') | components/test_runner/mock_screen_orientation_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698