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

Issue 320993003: [GCM] Add app handler support for connection events (Closed)

Created:
6 years, 6 months ago by Nicolas Zea
Modified:
6 years, 6 months ago
Reviewers:
jianli, pavely, fgorski
CC:
chromium-reviews, Luigi Semenzato
Visibility:
Public.

Description

[GCM] Add app handler support for connection events The OnConnected/OnDisconnected events are now plumbed through to app handlers (and the default app handler). The App Handler has a default empty implementation for those apps that don't care about exposing it. Additionally, because an app might miss the first OnConnected event, an IsConnected method is exposed by the GCMDriver that returns the last known connected status as seen by the UI thread. BUG=378536 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=277200

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Add basic tests #

Total comments: 4

Patch Set 4 : Address comments #

Patch Set 5 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+196 lines, -13 lines) Patch
M components/gcm_driver.gypi View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M components/gcm_driver/default_gcm_app_handler.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M components/gcm_driver/default_gcm_app_handler.cc View 2 chunks +11 lines, -0 lines 0 comments Download
M components/gcm_driver/fake_gcm_app_handler.h View 3 chunks +5 lines, -1 line 0 comments Download
M components/gcm_driver/fake_gcm_app_handler.cc View 2 chunks +10 lines, -1 line 0 comments Download
M components/gcm_driver/fake_gcm_client.cc View 1 2 3 chunks +3 lines, -0 lines 0 comments Download
M components/gcm_driver/fake_gcm_driver.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M components/gcm_driver/fake_gcm_driver.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M components/gcm_driver/gcm_app_handler.h View 1 2 3 4 2 chunks +12 lines, -2 lines 0 comments Download
A components/gcm_driver/gcm_app_handler.cc View 1 chunk +18 lines, -0 lines 0 comments Download
M components/gcm_driver/gcm_client.h View 1 2 chunks +10 lines, -0 lines 0 comments Download
M components/gcm_driver/gcm_client_impl.cc View 1 2 3 4 3 chunks +5 lines, -2 lines 0 comments Download
M components/gcm_driver/gcm_client_impl_unittest.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M components/gcm_driver/gcm_driver.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M components/gcm_driver/gcm_driver_android.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M components/gcm_driver/gcm_driver_android.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M components/gcm_driver/gcm_driver_desktop.h View 1 3 chunks +8 lines, -0 lines 0 comments Download
M components/gcm_driver/gcm_driver_desktop.cc View 1 2 3 7 chunks +65 lines, -0 lines 0 comments Download
M components/gcm_driver/gcm_driver_desktop_unittest.cc View 1 2 3 3 chunks +14 lines, -2 lines 0 comments Download
M components/invalidation/gcm_invalidation_bridge.h View 1 2 3 4 1 chunk +6 lines, -4 lines 0 comments Download
M components/invalidation/gcm_invalidation_bridge.cc View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Nicolas Zea
PTAL
6 years, 6 months ago (2014-06-09 23:02:07 UTC) #1
jianli
lgtm https://codereview.chromium.org/320993003/diff/60001/components/gcm_driver/gcm_driver_desktop_unittest.cc File components/gcm_driver/gcm_driver_desktop_unittest.cc (right): https://codereview.chromium.org/320993003/diff/60001/components/gcm_driver/gcm_driver_desktop_unittest.cc#newcode325 components/gcm_driver/gcm_driver_desktop_unittest.cc:325: EXPECT_FALSE(driver()->IsStarted()); Could you please check driver()->IsConnected() and gcm_app_handler()->connected() ...
6 years, 6 months ago (2014-06-09 23:15:28 UTC) #2
fgorski
lgtm https://codereview.chromium.org/320993003/diff/60001/components/gcm_driver/gcm_driver_desktop.cc File components/gcm_driver/gcm_driver_desktop.cc (right): https://codereview.chromium.org/320993003/diff/60001/components/gcm_driver/gcm_driver_desktop.cc#newcode707 components/gcm_driver/gcm_driver_desktop.cc:707: GetAppHandler("")->OnConnected(ip_endpoint); nit: could we add a constant for ...
6 years, 6 months ago (2014-06-09 23:19:43 UTC) #3
Nicolas Zea
+Pavel for gcm_invalidation_bridge +Luigi FYI, see comment in default_gcm_app_handler https://codereview.chromium.org/320993003/diff/60001/components/gcm_driver/gcm_driver_desktop.cc File components/gcm_driver/gcm_driver_desktop.cc (right): https://codereview.chromium.org/320993003/diff/60001/components/gcm_driver/gcm_driver_desktop.cc#newcode707 components/gcm_driver/gcm_driver_desktop.cc:707: ...
6 years, 6 months ago (2014-06-09 23:28:25 UTC) #4
pavely
gcm_invalidation_bridge lgtm
6 years, 6 months ago (2014-06-09 23:32:01 UTC) #5
Nicolas Zea
The CQ bit was checked by zea@chromium.org
6 years, 6 months ago (2014-06-13 18:32:52 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zea@chromium.org/320993003/80001
6 years, 6 months ago (2014-06-13 18:35:00 UTC) #7
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_aosp on tryserver.chromium ...
6 years, 6 months ago (2014-06-13 20:30:42 UTC) #8
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-13 20:32:51 UTC) #9
commit-bot: I haz the power
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/16745)
6 years, 6 months ago (2014-06-13 20:32:52 UTC) #10
Nicolas Zea
The CQ bit was checked by zea@chromium.org
6 years, 6 months ago (2014-06-13 22:00:05 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/zea@chromium.org/320993003/100001
6 years, 6 months ago (2014-06-13 22:02:50 UTC) #12
commit-bot: I haz the power
6 years, 6 months ago (2014-06-14 08:28:47 UTC) #13
Message was sent while issue was closed.
Change committed as 277200

Powered by Google App Engine
This is Rietveld 408576698