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

Issue 1856753002: GCM: Fix for null Sender ID on Android (Closed)

Created:
4 years, 8 months ago by johnme
Modified:
4 years, 8 months ago
Reviewers:
Peter Beverloo
CC:
chromium-reviews, johnme+watch_chromium.org, zea+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

GCM: Fix for null Sender ID on Android ChromeGcmListenerService was reading the sender ID from the wrong place (possibly because GCM used to include the sender ID both as a method parameter and in the bundle, then later stopped including it in the Bundle). This patch fixes that. The only real consequence of a missing sender ID was that if PushMessagingServiceImpl::DeliverMessageCallback decided to unsubscribe the subscription due to an error, PushMessagingServiceImpl::Unsubscribe would hit the sender_id.empty() code path and fail to unsubscribe from GCM (but messages would already have stopped being delivered). Even that consequence will become irrelevant once we switch to InstanceID, which no longer requires sender ID in order to unsubscribe. BUG=599434 Committed: https://crrev.com/598e5bd98f9199a001cfdaa37842e40564538bed Cr-Commit-Position: refs/heads/master@{#384943}

Patch Set 1 #

Patch Set 2 : Add logging, @Nullable and comment #

Patch Set 3 : Fix ChromeGcmListenerService instead of adding null check #

Patch Set 4 : Remove @Nullable #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -8 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/services/gcm/ChromeGcmListenerService.java View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/push_messaging/PushMessagingTest.java View 1 2 2 chunks +1 line, -3 lines 0 comments Download
M components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/GCMDriver.java View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 22 (11 generated)
johnme
4 years, 8 months ago (2016-04-04 14:30:36 UTC) #2
Peter Beverloo
This would happen when someone uses Stubby to send messages but doesn't fill in the ...
4 years, 8 months ago (2016-04-04 14:41:21 UTC) #5
Peter Beverloo
I just read your reply on the bug, that's more sketchy and definitely not expected. ...
4 years, 8 months ago (2016-04-04 14:43:22 UTC) #6
johnme
Total re-write. PTAL.
4 years, 8 months ago (2016-04-04 15:53:58 UTC) #8
johnme
Peter renewed his lgtm offline.
4 years, 8 months ago (2016-04-04 16:42:14 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1856753002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1856753002/40001
4 years, 8 months ago (2016-04-04 16:42:36 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: android_chromium_gn_compile_rel on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_rel/builds/45045)
4 years, 8 months ago (2016-04-04 16:57:06 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1856753002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1856753002/60001
4 years, 8 months ago (2016-04-04 17:05:53 UTC) #17
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 8 months ago (2016-04-04 17:50:28 UTC) #19
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/598e5bd98f9199a001cfdaa37842e40564538bed Cr-Commit-Position: refs/heads/master@{#384943}
4 years, 8 months ago (2016-04-04 17:52:01 UTC) #21
Peter Beverloo
4 years, 8 months ago (2016-04-04 19:21:29 UTC) #22
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698