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

Unified Diff: components/invalidation/gcm_network_channel.cc

Issue 1144153004: components: Remove use of MessageLoopProxy and deprecated MessageLoop APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 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: components/invalidation/gcm_network_channel.cc
diff --git a/components/invalidation/gcm_network_channel.cc b/components/invalidation/gcm_network_channel.cc
index 8f9caeda8bc1e4195499d99e1fe4410d5f5ad729..9f74b551c11f68df2f9c17588af0af525a6bee17 100644
--- a/components/invalidation/gcm_network_channel.cc
+++ b/components/invalidation/gcm_network_channel.cc
@@ -4,10 +4,13 @@
#include "base/base64.h"
#include "base/i18n/time_formatting.h"
+#include "base/location.h"
#include "base/metrics/histogram.h"
#include "base/sha1.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
+#include "base/thread_task_runner_handle.h"
#if !defined(OS_ANDROID)
// channel_common.proto defines ANDROID constant that conflicts with Android
// build. At the same time TiclInvalidationService is not used on Android so it
@@ -146,10 +149,9 @@ void GCMNetworkChannel::OnRegisterComplete(
case gcm::GCMClient::TTL_EXCEEDED:
case gcm::GCMClient::UNKNOWN_ERROR: {
register_backoff_entry_->InformOfRequest(false);
- base::MessageLoop::current()->PostDelayedTask(
- FROM_HERE,
- base::Bind(&GCMNetworkChannel::Register,
- weak_factory_.GetWeakPtr()),
+ base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+ FROM_HERE, base::Bind(&GCMNetworkChannel::Register,
+ weak_factory_.GetWeakPtr()),
register_backoff_entry_->GetTimeUntilRelease());
break;
}
« no previous file with comments | « components/html_viewer/web_layer_tree_view_impl.cc ('k') | components/invalidation/gcm_network_channel_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698