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

Issue 185133008: [GCM] Only allow the senders that the application is currently registered for (Closed)

Created:
6 years, 9 months ago by fgorski
Modified:
6 years, 9 months ago
Reviewers:
Dmitry Titov, jianli
CC:
chromium-reviews
Visibility:
Public.

Description

Only allow the senders that the application is currently registered for to send messages to it. * GCMProfileService adds a check that the app is currently registered for the sender_id of the sender that sent the message * IncomingMessage is extended to add sender_id * GCMClientImpl adds the sender_id to the incoming message in the handling code. * Adding a test verifying that messages are not delivered when not registered for senders * fixing the GCM Profile Service tests that were previously not registering for senders before delivering messages * Also: moving the DCHECKS in the GCMClientImpl::HandleIncomingMessage higher up to run them as soon as the checks values are available. This CL obsoletes https://codereview.chromium.org/185933003/ BUG=344665 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255483

Patch Set 1 #

Total comments: 8

Patch Set 2 : Updates based on code reviews #

Total comments: 1

Patch Set 3 : Moving the comment up #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -5 lines) Patch
M chrome/browser/services/gcm/gcm_profile_service.cc View 1 2 2 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/services/gcm/gcm_profile_service_unittest.cc View 1 10 chunks +81 lines, -0 lines 0 comments Download
M google_apis/gcm/gcm_client.h View 1 chunk +1 line, -0 lines 0 comments Download
M google_apis/gcm/gcm_client_impl.cc View 2 chunks +7 lines, -5 lines 0 comments Download
M google_apis/gcm/gcm_client_impl_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
fgorski
PTAL (this is almost the same patch remade for multi-sender registration)
6 years, 9 months ago (2014-03-05 00:41:21 UTC) #1
jianli
https://codereview.chromium.org/185133008/diff/1/chrome/browser/services/gcm/gcm_profile_service.cc File chrome/browser/services/gcm/gcm_profile_service.cc (right): https://codereview.chromium.org/185133008/diff/1/chrome/browser/services/gcm/gcm_profile_service.cc#newcode919 chrome/browser/services/gcm/gcm_profile_service.cc:919: for (std::vector<std::string>::const_iterator iter = nit: Please add a comment ...
6 years, 9 months ago (2014-03-05 01:33:02 UTC) #2
Dmitry Titov
Nothing to add to Jian's notes, LGTM.
6 years, 9 months ago (2014-03-05 01:48:00 UTC) #3
fgorski
All fixed. PTAL https://codereview.chromium.org/185133008/diff/1/chrome/browser/services/gcm/gcm_profile_service.cc File chrome/browser/services/gcm/gcm_profile_service.cc (right): https://codereview.chromium.org/185133008/diff/1/chrome/browser/services/gcm/gcm_profile_service.cc#newcode919 chrome/browser/services/gcm/gcm_profile_service.cc:919: for (std::vector<std::string>::const_iterator iter = On 2014/03/05 ...
6 years, 9 months ago (2014-03-05 19:30:22 UTC) #4
jianli
lgtm https://codereview.chromium.org/185133008/diff/10001/chrome/browser/services/gcm/gcm_profile_service.cc File chrome/browser/services/gcm/gcm_profile_service.cc (right): https://codereview.chromium.org/185133008/diff/10001/chrome/browser/services/gcm/gcm_profile_service.cc#newcode917 chrome/browser/services/gcm/gcm_profile_service.cc:917: // Dropping the message when application does not ...
6 years, 9 months ago (2014-03-05 20:46:30 UTC) #5
fgorski
The CQ bit was checked by fgorski@chromium.org
6 years, 9 months ago (2014-03-05 20:53:19 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fgorski@chromium.org/185133008/30001
6 years, 9 months ago (2014-03-05 20:55:08 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-05 21:09:01 UTC) #8
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) app_list_unittests, ash_unittests, aura_unittests, base_unittests, browser_tests, cacheinvalidation_unittests, ...
6 years, 9 months ago (2014-03-05 21:09:02 UTC) #9
fgorski
The CQ bit was checked by fgorski@chromium.org
6 years, 9 months ago (2014-03-05 22:42:39 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fgorski@chromium.org/185133008/30001
6 years, 9 months ago (2014-03-05 22:44:41 UTC) #11
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-05 23:38:03 UTC) #12
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) net_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=275749
6 years, 9 months ago (2014-03-05 23:38:03 UTC) #13
fgorski
The CQ bit was checked by fgorski@chromium.org
6 years, 9 months ago (2014-03-06 00:00:24 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fgorski@chromium.org/185133008/30001
6 years, 9 months ago (2014-03-06 00:23:58 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-06 00:49:27 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel
6 years, 9 months ago (2014-03-06 00:49:28 UTC) #17
fgorski
The CQ bit was checked by fgorski@chromium.org
6 years, 9 months ago (2014-03-06 17:14:19 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fgorski@chromium.org/185133008/30001
6 years, 9 months ago (2014-03-06 17:14:38 UTC) #19
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-06 19:07:57 UTC) #20
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests, unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=276468
6 years, 9 months ago (2014-03-06 19:07:58 UTC) #21
fgorski
The CQ bit was checked by fgorski@chromium.org
6 years, 9 months ago (2014-03-06 19:10:53 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fgorski@chromium.org/185133008/30001
6 years, 9 months ago (2014-03-06 19:14:29 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fgorski@chromium.org/185133008/30001
6 years, 9 months ago (2014-03-06 20:59:44 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fgorski@chromium.org/185133008/30001
6 years, 9 months ago (2014-03-06 21:53:57 UTC) #25
commit-bot: I haz the power
6 years, 9 months ago (2014-03-07 00:58:42 UTC) #26
Message was sent while issue was closed.
Change committed as 255483

Powered by Google App Engine
This is Rietveld 408576698