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

Unified Diff: components/safe_json/testing_json_parser.cc

Issue 2037843002: Remove use of deprecated MessageLoop methods in components. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change precache Created 4 years, 6 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
« no previous file with comments | « components/safe_browsing_db/database_manager_unittest.cc ('k') | components/timers/alarm_timer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_json/testing_json_parser.cc
diff --git a/components/safe_json/testing_json_parser.cc b/components/safe_json/testing_json_parser.cc
index ec24bc90707126312224b1a461bb7d9ccfd51db7..c2f9639ab6bdceb2f0e0f15a7d44223c295a3ed3 100644
--- a/components/safe_json/testing_json_parser.cc
+++ b/components/safe_json/testing_json_parser.cc
@@ -10,7 +10,8 @@
#include "base/bind_helpers.h"
#include "base/json/json_reader.h"
#include "base/location.h"
-#include "base/message_loop/message_loop.h"
+#include "base/single_thread_task_runner.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "base/values.h"
namespace safe_json {
@@ -51,8 +52,8 @@ void TestingJsonParser::Start() {
// Run the callback asynchronously. Post the delete task first, so that the
// completion callbacks may quit the run loop without leaking |this|.
- base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE, value ? base::Bind(success_callback_, base::Passed(&value))
: base::Bind(error_callback_, error));
}
« no previous file with comments | « components/safe_browsing_db/database_manager_unittest.cc ('k') | components/timers/alarm_timer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698