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

Unified Diff: chrome/browser/extensions/api/gcm/gcm_api.cc

Issue 914693002: Push API: Fix unsubscribing from GCM on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment nits I missed earlier Created 5 years, 10 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/extensions/api/gcm/gcm_api.cc
diff --git a/chrome/browser/extensions/api/gcm/gcm_api.cc b/chrome/browser/extensions/api/gcm/gcm_api.cc
index 75d7d18867aac2004a1dcc67f3e11e3f2eeaf617..ff51614dd2e5f9140c35e94944285c26ad74d5f1 100644
--- a/chrome/browser/extensions/api/gcm/gcm_api.cc
+++ b/chrome/browser/extensions/api/gcm/gcm_api.cc
@@ -133,10 +133,15 @@ GcmUnregisterFunction::GcmUnregisterFunction() {}
GcmUnregisterFunction::~GcmUnregisterFunction() {}
bool GcmUnregisterFunction::DoWork() {
+#if defined(OS_ANDROID)
jianli 2015/02/13 22:33:16 gcm_api.cc is not supposed to be included for Andr
johnme 2015/02/14 01:48:35 The patch no longer modifies this file.
+#error If this ever gets ported to Android, you must pass the real sender ID.
+#endif
UMA_HISTOGRAM_BOOLEAN("GCM.APICallUnregister", true);
+ std::vector<std::string> sender_ids; // These are ignored on non-Android.
GetGCMDriver()->Unregister(
extension()->id(),
+ sender_ids,
base::Bind(&GcmUnregisterFunction::CompleteFunctionWithResult, this));
return true;

Powered by Google App Engine
This is Rietveld 408576698