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

Issue 2578583002: Provide a mechanism for the GCM driver to send message receipts to GCM.

Created:
4 years ago by harkness
Modified:
3 years, 10 months ago
CC:
chromium-reviews, johnme+watch_chromium.org, zea+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Provide a mechanism for the GCM driver to send message receipts to GCM. As part of an effort to provide better message tracking for GCM messages, this CL establishes a basic system for sending receipts to GCM. The SendMessageReceipt is implemented on the GCMDriver and will send back an integer representing a status, which GCM can use to aggregate data about final message results. This CL also implements receipts for the various GCM level failures that messages could encounter. A future CL will provide a callback to send receipts to GCMAppHandlers so that receipts can provide full end-to-end visibility into errors and successes. BUG=674131

Patch Set 1 #

Total comments: 18

Patch Set 2 : Refactoring to move callback method to GCMClient layer. #

Patch Set 3 : Use BindToCurrentThread for the GCMClient callback, also move GCMMessageStatus to its own file. #

Patch Set 4 : Cleanup #

Patch Set 5 : Adding new file I missed previously. #

Total comments: 22

Patch Set 6 : Integrated code review comments #

Patch Set 7 : Added a callback entry point to GCMDriver, moved MessageReceiptCallback to gcm_message_status. #

Total comments: 40

Patch Set 8 : Move DoSendMessageReceipt to GCMDriverDesktop and updated nits #

Patch Set 9 : Add Finch trial control #

Patch Set 10 : Registration, not reservation #

Total comments: 33

Patch Set 11 : Code review comments and switched to using the new field trial location #

Patch Set 12 : Formatting #

Total comments: 11

Patch Set 13 : Added more tests to check functionality with the field trial. Fixed nits. #

Patch Set 14 : Fix issue with rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+489 lines, -71 lines) Patch
M chrome/browser/gcm/fake_gcm_profile_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/gcm/fake_gcm_profile_service.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +12 lines, -7 lines 0 comments Download
M chrome/browser/push_messaging/push_messaging_service_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +18 lines, -1 line 0 comments Download
M components/gcm_driver/fake_gcm_client.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +14 lines, -1 line 0 comments Download
M components/gcm_driver/fake_gcm_client.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +23 lines, -8 lines 0 comments Download
M components/gcm_driver/gcm_account_mapper.h View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +7 lines, -5 lines 0 comments Download
M components/gcm_driver/gcm_account_mapper.cc View 1 2 3 chunks +7 lines, -1 line 0 comments Download
M components/gcm_driver/gcm_account_mapper_unittest.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -3 lines 0 comments Download
M components/gcm_driver/gcm_client.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -2 lines 0 comments Download
M components/gcm_driver/gcm_client_impl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +8 lines, -0 lines 0 comments Download
M components/gcm_driver/gcm_client_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 11 chunks +83 lines, -10 lines 0 comments Download
M components/gcm_driver/gcm_client_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 chunks +202 lines, -6 lines 0 comments Download
M components/gcm_driver/gcm_driver.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +11 lines, -6 lines 0 comments Download
M components/gcm_driver/gcm_driver.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +10 lines, -3 lines 0 comments Download
M components/gcm_driver/gcm_driver_android.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M components/gcm_driver/gcm_driver_android.cc View 1 2 3 4 5 6 7 1 chunk +7 lines, -1 line 0 comments Download
M components/gcm_driver/gcm_driver_desktop.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -1 line 0 comments Download
M components/gcm_driver/gcm_driver_desktop.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +27 lines, -12 lines 0 comments Download
M components/gcm_driver/gcm_driver_desktop_unittest.cc View 1 4 chunks +4 lines, -3 lines 0 comments Download
A components/gcm_driver/gcm_message_status.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +32 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 31 (10 generated)
harkness
Not 100% done. I still need to connect the SendMessageReceiptCallback and it needs a lot ...
4 years ago (2016-12-14 14:12:54 UTC) #2
Peter Beverloo
Some initial feedback - thanks for doing this! At a higher level, we should not ...
4 years ago (2016-12-15 19:24:25 UTC) #3
harkness
Very im progress work at the moment. This is to give Peter a concrete view ...
4 years ago (2016-12-21 17:23:38 UTC) #4
harkness
Ready for code review now please. :)
3 years, 11 months ago (2017-01-10 14:00:59 UTC) #5
Peter Beverloo
Thanks, this is heading in a good direction :). Jen, could you make sure that ...
3 years, 11 months ago (2017-01-13 01:46:12 UTC) #6
Nicolas Zea
On 2017/01/13 01:46:12, Peter Beverloo (OOO- Jan 19th) wrote: > Thanks, this is heading in ...
3 years, 11 months ago (2017-01-18 01:13:05 UTC) #7
harkness
New patch responded to previous comments. Re BindToCurrentThread: I definitely feel like BindToCurrentThread is really ...
3 years, 11 months ago (2017-01-19 13:20:42 UTC) #8
Nicolas Zea
Would probably be good to start a thread with some of the base owners about ...
3 years, 11 months ago (2017-01-20 18:14:11 UTC) #9
harkness
Peter and I discussed the bind_to_taskrunner, and he remembered that there had been issues with ...
3 years, 10 months ago (2017-02-07 15:15:10 UTC) #10
Peter Beverloo
https://codereview.chromium.org/2578583002/diff/120001/chrome/browser/services/gcm/fake_gcm_profile_service.h File chrome/browser/services/gcm/fake_gcm_profile_service.h (right): https://codereview.chromium.org/2578583002/diff/120001/chrome/browser/services/gcm/fake_gcm_profile_service.h#newcode13 chrome/browser/services/gcm/fake_gcm_profile_service.h:13: #include "components/gcm_driver/gcm_client.h" note: you'll get some interesting merge conflicts ...
3 years, 10 months ago (2017-02-08 17:09:09 UTC) #11
harkness
Threading and nits taken care of. Finch coming soon. https://codereview.chromium.org/2578583002/diff/120001/chrome/browser/services/gcm/fake_gcm_profile_service.h File chrome/browser/services/gcm/fake_gcm_profile_service.h (right): https://codereview.chromium.org/2578583002/diff/120001/chrome/browser/services/gcm/fake_gcm_profile_service.h#newcode13 chrome/browser/services/gcm/fake_gcm_profile_service.h:13: ...
3 years, 10 months ago (2017-02-09 16:27:30 UTC) #12
harkness
Finch trial is available. I believe the code is complete at this point.
3 years, 10 months ago (2017-02-13 12:08:39 UTC) #13
Peter Beverloo
Largely LG, two larger items: 1) Field trial status tuple (see gcm_client_impl.cc) 2) Remove the ...
3 years, 10 months ago (2017-02-13 13:47:08 UTC) #14
harkness
https://codereview.chromium.org/2578583002/diff/180001/components/gcm_driver/gcm_client.h File components/gcm_driver/gcm_client.h (right): https://codereview.chromium.org/2578583002/diff/180001/components/gcm_driver/gcm_client.h#newcode183 components/gcm_driver/gcm_client.h:183: const MessageReceiptCallback& optional_receipt_callback) = 0; On 2017/02/13 13:47:06, Peter ...
3 years, 10 months ago (2017-02-14 19:22:29 UTC) #15
harkness
The last patch set also included a rebase, because I needed to pick up the ...
3 years, 10 months ago (2017-02-14 19:23:28 UTC) #16
Peter Beverloo
lgtm % testing to make sure that the disabled field trial actually bails out I'd ...
3 years, 10 months ago (2017-02-15 15:17:16 UTC) #17
harkness
isherman@ Could you please take a look at the field trial I've established and give ...
3 years, 10 months ago (2017-02-22 17:19:32 UTC) #19
Peter Beverloo
https://codereview.chromium.org/2578583002/diff/220001/components/gcm_driver/gcm_client_impl.cc File components/gcm_driver/gcm_client_impl.cc (right): https://codereview.chromium.org/2578583002/diff/220001/components/gcm_driver/gcm_client_impl.cc#newcode1546 components/gcm_driver/gcm_client_impl.cc:1546: Send(app_id, kReceiptGCMDestinationID, message); On 2017/02/22 17:19:32, harkness wrote: > ...
3 years, 10 months ago (2017-02-22 17:24:24 UTC) #20
Peter Beverloo
On 2017/02/22 17:24:24, Peter Beverloo wrote: > That is not OK per the contract of ...
3 years, 10 months ago (2017-02-22 17:32:09 UTC) #23
harkness
On 2017/02/22 17:32:09, Peter Beverloo wrote: > On 2017/02/22 17:24:24, Peter Beverloo wrote: > > ...
3 years, 10 months ago (2017-02-22 18:02:10 UTC) #28
Ilya Sherman
3 years, 10 months ago (2017-02-22 23:17:02 UTC) #31
https://codereview.chromium.org/2578583002/diff/180001/components/gcm_driver/...
File components/gcm_driver/gcm_client_impl.cc (right):

https://codereview.chromium.org/2578583002/diff/180001/components/gcm_driver/...
components/gcm_driver/gcm_client_impl.cc:115: "GCMMessageReceiptsFeature",
base::FEATURE_ENABLED_BY_DEFAULT};
On 2017/02/14 19:22:28, harkness wrote:
> On 2017/02/13 13:47:06, Peter Beverloo wrote:
> > Rather than having a trial that's always enabled and has three values {none,
> > failures, all}, have you considered having a trial that can be disabled
{none}
> > and enabled w/ a value of {failures, all}?
> 
> I did consider that, and functionally they're identical. This one just make a
> bit more sense to me, but it's purely an aesthetic choice. I can change it if
> you prefer.

Either approach is okay from a functionality perspective, so I'll defer to your
team on which setup you prefer.  I do agree with Peter that if I were writing
this code, I'd probably treat "none" as a "disabled" state rather than as an
"enabled" state.

Powered by Google App Engine
This is Rietveld 408576698