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

Unified Diff: chrome/browser/services/gcm/fake_gcm_profile_service.cc

Issue 1143343005: chrome/browser: 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, 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
Index: chrome/browser/services/gcm/fake_gcm_profile_service.cc
diff --git a/chrome/browser/services/gcm/fake_gcm_profile_service.cc b/chrome/browser/services/gcm/fake_gcm_profile_service.cc
index a1b5e3c24ee68faed00c89a3d93a2b237c387ef9..cea82d8b21ff718ea903d3adec237883bbf50d62 100644
--- a/chrome/browser/services/gcm/fake_gcm_profile_service.cc
+++ b/chrome/browser/services/gcm/fake_gcm_profile_service.cc
@@ -6,9 +6,11 @@
#include "base/bind.h"
#include "base/format_macros.h"
-#include "base/message_loop/message_loop.h"
+#include "base/location.h"
+#include "base/single_thread_task_runner.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
+#include "base/thread_task_runner_handle.h"
#include "chrome/browser/profiles/profile.h"
#include "components/gcm_driver/fake_gcm_client_factory.h"
#include "components/gcm_driver/fake_gcm_driver.h"
@@ -58,32 +60,24 @@ CustomFakeGCMDriver::~CustomFakeGCMDriver() {
void CustomFakeGCMDriver::RegisterImpl(
const std::string& app_id,
const std::vector<std::string>& sender_ids) {
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&FakeGCMProfileService::RegisterFinished,
- base::Unretained(service_),
- app_id,
- sender_ids));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&FakeGCMProfileService::RegisterFinished,
+ base::Unretained(service_), app_id, sender_ids));
}
void CustomFakeGCMDriver::UnregisterImpl(const std::string& app_id) {
- base::MessageLoop::current()->PostTask(
- FROM_HERE, base::Bind(
- &FakeGCMProfileService::UnregisterFinished,
- base::Unretained(service_),
- app_id));
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&FakeGCMProfileService::UnregisterFinished,
+ base::Unretained(service_), app_id));
}
void CustomFakeGCMDriver::SendImpl(const std::string& app_id,
const std::string& receiver_id,
const GCMClient::OutgoingMessage& message) {
- base::MessageLoop::current()->PostTask(
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&FakeGCMProfileService::SendFinished,
- base::Unretained(service_),
- app_id,
- receiver_id,
- message));
+ base::Unretained(service_), app_id, receiver_id, message));
}
void CustomFakeGCMDriver::OnRegisterFinished(

Powered by Google App Engine
This is Rietveld 408576698