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

Unified Diff: components/gcm_driver/gcm_driver_desktop.cc

Issue 2789123003: [GCM] Run InstanceIDImpl callbacks asynchronously (Closed)
Patch Set: Created 3 years, 9 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/gcm_driver/gcm_driver_desktop.cc
diff --git a/components/gcm_driver/gcm_driver_desktop.cc b/components/gcm_driver/gcm_driver_desktop.cc
index e96e87c0af74172fed9be3742028ed30aaa5e7b1..e7aecc89100ed1ff2d00efcc28db811482067c6f 100644
--- a/components/gcm_driver/gcm_driver_desktop.cc
+++ b/components/gcm_driver/gcm_driver_desktop.cc
@@ -18,6 +18,7 @@
#include "base/sequenced_task_runner.h"
#include "base/task_runner_util.h"
#include "base/threading/sequenced_worker_pool.h"
+#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "components/gcm_driver/gcm_account_mapper.h"
#include "components/gcm_driver/gcm_app_handler.h"
@@ -1118,7 +1119,8 @@ void GCMDriverDesktop::GetInstanceIDData(
GCMClient::Result result = EnsureStarted(GCMClient::IMMEDIATE_START);
if (result != GCMClient::SUCCESS) {
- callback.Run(std::string(), std::string());
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(callback, std::string(), std::string()));
return;
}

Powered by Google App Engine
This is Rietveld 408576698