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

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: Now compiles and passes tests (and uses CHECK_EQ) 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..a3f07de3e23ef93f402ff54051c1a63a20557d75 100644
--- a/chrome/browser/extensions/api/gcm/gcm_api.cc
+++ b/chrome/browser/extensions/api/gcm/gcm_api.cc
@@ -135,11 +135,17 @@ GcmUnregisterFunction::~GcmUnregisterFunction() {}
bool GcmUnregisterFunction::DoWork() {
UMA_HISTOGRAM_BOOLEAN("GCM.APICallUnregister", true);
+#if defined(OS_ANDROID)
+ LOG(FATAL) << "GcmUnregisterFunction is not implemented on Android";
+#else
+ std::vector<std::string> sender_ids; // These are ignored on desktop.
GetGCMDriver()->Unregister(
extension()->id(),
+ sender_ids,
base::Bind(&GcmUnregisterFunction::CompleteFunctionWithResult, this));
return true;
+#endif
}
void GcmUnregisterFunction::CompleteFunctionWithResult(

Powered by Google App Engine
This is Rietveld 408576698