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

Unified Diff: sync/internal_api/http_bridge.cc

Issue 2033933002: Remove use of deprecated MessageLoop methods in sync. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: sync/internal_api/http_bridge.cc
diff --git a/sync/internal_api/http_bridge.cc b/sync/internal_api/http_bridge.cc
index b50b266d0cc4748be9025f389ae78f95bc04b003..4675e2e1047acf5711a10328cc0a518704eda1ad 100644
--- a/sync/internal_api/http_bridge.cc
+++ b/sync/internal_api/http_bridge.cc
@@ -10,13 +10,16 @@
#include <vector>
#include "base/bit_cast.h"
+#include "base/location.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/sparse_histogram.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "net/base/load_flags.h"
#include "net/base/net_errors.h"
#include "net/http/http_cache.h"
@@ -379,7 +382,8 @@ void HttpBridge::OnURLFetchComplete(const net::URLFetcher* source) {
// End of the line for url_poster_. It lives only on the IO loop.
// We defer deletion because we're inside a callback from a component of the
// URLFetcher, so it seems most natural / "polite" to let the stack unwind.
- base::MessageLoop::current()->DeleteSoon(FROM_HERE, fetch_state_.url_poster);
+ base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE,
+ fetch_state_.url_poster);
fetch_state_.url_poster = NULL;
// Wake the blocked syncer thread in MakeSynchronousPost.

Powered by Google App Engine
This is Rietveld 408576698