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

Issue 1137463003: Support getting and deleting token for Instance ID. (Closed)

Created:
5 years, 7 months ago by jianli
Modified:
5 years, 7 months ago
Reviewers:
Nicolas Zea, fgorski
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, zea+watch_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support getting and deleting token for Instance ID. GCM's registration and unregistration request have been refactored to support token requests for Instance ID. BUG=477084 TEST=new tests Committed: https://crrev.com/7a0c9b6d322d0a501fc114d3854df944fc059f0f Cr-Commit-Position: refs/heads/master@{#331475}

Patch Set 1 #

Patch Set 2 : Add new files #

Total comments: 51

Patch Set 3 : Address feedback #

Patch Set 4 : Pass InstanceID to requests #

Total comments: 8

Patch Set 5 : Address more feedback #

Patch Set 6 : Fix tests #

Patch Set 7 : Sync #

Total comments: 8

Patch Set 8 : Address more feedback #

Patch Set 9 : Fix trybots #

Total comments: 13

Patch Set 10 : Address zea's feedback #

Patch Set 11 : More changes #

Total comments: 22

Patch Set 12 : Patch to land #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2463 lines, -673 lines) Patch
M chrome/browser/extensions/api/instance_id/instance_id_api.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/api/instance_id/instance_id_api.cc View 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/instance_id/delete_token/delete_token.js View 2 chunks +40 lines, -4 lines 0 comments Download
M chrome/test/data/extensions/api_test/instance_id/get_token/get_token.js View 1 chunk +2 lines, -3 lines 0 comments Download
M components/gcm_driver.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M components/gcm_driver/BUILD.gn View 1 1 chunk +2 lines, -0 lines 0 comments Download
M components/gcm_driver/fake_gcm_client.h View 1 2 3 4 5 6 3 chunks +13 lines, -8 lines 0 comments Download
M components/gcm_driver/fake_gcm_client.cc View 1 2 3 4 5 6 3 chunks +26 lines, -14 lines 0 comments Download
M components/gcm_driver/fake_gcm_driver.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M components/gcm_driver/fake_gcm_driver.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M components/gcm_driver/gcm_client.h View 1 2 3 4 5 6 4 chunks +33 lines, -20 lines 0 comments Download
M components/gcm_driver/gcm_client_impl.h View 1 2 3 4 5 6 7 6 chunks +31 lines, -23 lines 0 comments Download
M components/gcm_driver/gcm_client_impl.cc View 1 2 3 4 5 6 7 8 9 10 13 chunks +224 lines, -60 lines 0 comments Download
M components/gcm_driver/gcm_client_impl_unittest.cc View 10 chunks +41 lines, -20 lines 0 comments Download
M components/gcm_driver/gcm_driver.h View 1 2 3 4 5 6 2 chunks +27 lines, -10 lines 0 comments Download
M components/gcm_driver/gcm_driver.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -3 lines 0 comments Download
M components/gcm_driver/gcm_driver_android.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M components/gcm_driver/gcm_driver_android.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M components/gcm_driver/gcm_driver_desktop.h View 1 2 3 4 5 6 6 chunks +37 lines, -5 lines 0 comments Download
M components/gcm_driver/gcm_driver_desktop.cc View 1 2 3 4 5 6 7 11 chunks +237 lines, -28 lines 0 comments Download
M components/gcm_driver/gcm_stats_recorder_impl.h View 1 chunk +3 lines, -3 lines 0 comments Download
M components/gcm_driver/gcm_stats_recorder_impl.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M components/gcm_driver/gcm_stats_recorder_impl_unittest.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h View 1 2 3 2 chunks +19 lines, -7 lines 0 comments Download
M components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.cc View 1 2 3 3 chunks +48 lines, -8 lines 0 comments Download
M components/gcm_driver/instance_id/instance_id.h View 1 chunk +2 lines, -0 lines 0 comments Download
M components/gcm_driver/instance_id/instance_id_driver_unittest.cc View 1 2 3 4 5 8 chunks +121 lines, -0 lines 0 comments Download
M components/gcm_driver/instance_id/instance_id_impl.h View 1 2 3 4 5 6 7 2 chunks +23 lines, -5 lines 0 comments Download
M components/gcm_driver/instance_id/instance_id_impl.cc View 1 2 3 4 5 6 7 4 chunks +157 lines, -38 lines 0 comments Download
A components/gcm_driver/registration_info.h View 1 2 3 4 5 6 7 1 chunk +130 lines, -0 lines 0 comments Download
A components/gcm_driver/registration_info.cc View 1 2 1 chunk +251 lines, -0 lines 0 comments Download
M google_apis/gcm/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 2 chunks +10 lines, -2 lines 0 comments Download
A google_apis/gcm/base/gcm_util.h View 1 2 3 4 5 6 7 8 9 1 chunk +21 lines, -0 lines 0 comments Download
A google_apis/gcm/base/gcm_util.cc View 1 2 3 4 5 6 7 1 chunk +19 lines, -0 lines 0 comments Download
A google_apis/gcm/engine/gcm_registration_request_handler.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +30 lines, -0 lines 0 comments Download
A google_apis/gcm/engine/gcm_registration_request_handler.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +29 lines, -0 lines 0 comments Download
M google_apis/gcm/engine/gcm_store.h View 1 2 3 4 5 6 7 8 9 3 chunks +9 lines, -6 lines 0 comments Download
M google_apis/gcm/engine/gcm_store_impl.h View 1 chunk +3 lines, -3 lines 0 comments Download
M google_apis/gcm/engine/gcm_store_impl.cc View 1 2 3 4 8 chunks +30 lines, -39 lines 0 comments Download
M google_apis/gcm/engine/gcm_store_impl_unittest.cc View 3 chunks +12 lines, -31 lines 0 comments Download
A google_apis/gcm/engine/gcm_unregistration_request_handler.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +33 lines, -0 lines 0 comments Download
A google_apis/gcm/engine/gcm_unregistration_request_handler.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +68 lines, -0 lines 0 comments Download
M google_apis/gcm/engine/gservices_settings_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
A google_apis/gcm/engine/instance_id_delete_token_request_handler.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +41 lines, -0 lines 0 comments Download
A google_apis/gcm/engine/instance_id_delete_token_request_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +65 lines, -0 lines 0 comments Download
A google_apis/gcm/engine/instance_id_get_token_request_handler.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +42 lines, -0 lines 0 comments Download
A google_apis/gcm/engine/instance_id_get_token_request_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +52 lines, -0 lines 0 comments Download
D google_apis/gcm/engine/registration_info.h View 1 chunk +0 lines, -35 lines 0 comments Download
D google_apis/gcm/engine/registration_info.cc View 1 chunk +0 lines, -62 lines 0 comments Download
M google_apis/gcm/engine/registration_request.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +25 lines, -10 lines 0 comments Download
M google_apis/gcm/engine/registration_request.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +43 lines, -49 lines 0 comments Download
M google_apis/gcm/engine/registration_request_unittest.cc View 1 2 3 4 5 6 7 8 9 10 20 chunks +176 lines, -37 lines 0 comments Download
M google_apis/gcm/engine/unregistration_request.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +29 lines, -5 lines 0 comments Download
M google_apis/gcm/engine/unregistration_request.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +58 lines, -83 lines 0 comments Download
M google_apis/gcm/engine/unregistration_request_unittest.cc View 1 2 3 4 5 6 7 8 9 10 15 chunks +156 lines, -25 lines 0 comments Download
M google_apis/gcm/gcm.gyp View 1 2 3 4 5 6 7 8 9 10 2 chunks +10 lines, -2 lines 0 comments Download
M google_apis/gcm/monitoring/fake_gcm_stats_recorder.h View 1 chunk +3 lines, -3 lines 0 comments Download
M google_apis/gcm/monitoring/fake_gcm_stats_recorder.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M google_apis/gcm/monitoring/gcm_stats_recorder.h View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 23 (5 generated)
jianli
5 years, 7 months ago (2015-05-13 01:17:59 UTC) #2
fgorski
https://codereview.chromium.org/1137463003/diff/40001/chrome/test/data/extensions/api_test/instance_id/delete_token/delete_token.js File chrome/test/data/extensions/api_test/instance_id/delete_token/delete_token.js (right): https://codereview.chromium.org/1137463003/diff/40001/chrome/test/data/extensions/api_test/instance_id/delete_token/delete_token.js#newcode113 chrome/test/data/extensions/api_test/instance_id/delete_token/delete_token.js:113: var oldToken; put this inside of the test. https://codereview.chromium.org/1137463003/diff/40001/components/gcm_driver/gcm_client_impl.cc ...
5 years, 7 months ago (2015-05-13 18:32:41 UTC) #4
jianli
https://codereview.chromium.org/1137463003/diff/40001/chrome/test/data/extensions/api_test/instance_id/delete_token/delete_token.js File chrome/test/data/extensions/api_test/instance_id/delete_token/delete_token.js (right): https://codereview.chromium.org/1137463003/diff/40001/chrome/test/data/extensions/api_test/instance_id/delete_token/delete_token.js#newcode113 chrome/test/data/extensions/api_test/instance_id/delete_token/delete_token.js:113: var oldToken; On 2015/05/13 18:32:38, fgorski wrote: > put ...
5 years, 7 months ago (2015-05-13 22:42:57 UTC) #5
jianli
zea, could you please also take a look? thanks.
5 years, 7 months ago (2015-05-13 22:48:05 UTC) #7
Nicolas Zea
First pass https://codereview.chromium.org/1137463003/diff/80001/google_apis/gcm/engine/gcm_store.h File google_apis/gcm/engine/gcm_store.h (right): https://codereview.chromium.org/1137463003/diff/80001/google_apis/gcm/engine/gcm_store.h#newcode85 google_apis/gcm/engine/gcm_store.h:85: virtual void AddRegistration(const std::string& serialized_key, Is registration ...
5 years, 7 months ago (2015-05-14 05:02:47 UTC) #8
jianli
https://codereview.chromium.org/1137463003/diff/80001/google_apis/gcm/engine/gcm_store.h File google_apis/gcm/engine/gcm_store.h (right): https://codereview.chromium.org/1137463003/diff/80001/google_apis/gcm/engine/gcm_store.h#newcode85 google_apis/gcm/engine/gcm_store.h:85: virtual void AddRegistration(const std::string& serialized_key, On 2015/05/14 05:02:47, Nicolas ...
5 years, 7 months ago (2015-05-14 19:18:14 UTC) #9
Nicolas Zea
https://codereview.chromium.org/1137463003/diff/140001/google_apis/gcm/engine/gcm_store.h File google_apis/gcm/engine/gcm_store.h (right): https://codereview.chromium.org/1137463003/diff/140001/google_apis/gcm/engine/gcm_store.h#newcode85 google_apis/gcm/engine/gcm_store.h:85: virtual void AddRegistration(const std::string& serialized_key, Does it make sense ...
5 years, 7 months ago (2015-05-15 20:37:01 UTC) #10
fgorski
LGTM with one comment. Please address comments from Nicolas. https://codereview.chromium.org/1137463003/diff/140001/components/gcm_driver/registration_info.h File components/gcm_driver/registration_info.h (right): https://codereview.chromium.org/1137463003/diff/140001/components/gcm_driver/registration_info.h#newcode45 components/gcm_driver/registration_info.h:45: ...
5 years, 7 months ago (2015-05-18 14:30:44 UTC) #11
jianli
https://codereview.chromium.org/1137463003/diff/140001/components/gcm_driver/registration_info.h File components/gcm_driver/registration_info.h (right): https://codereview.chromium.org/1137463003/diff/140001/components/gcm_driver/registration_info.h#newcode45 components/gcm_driver/registration_info.h:45: // |registration_id| can be NULL if no interest to ...
5 years, 7 months ago (2015-05-21 00:41:15 UTC) #12
Nicolas Zea
https://codereview.chromium.org/1137463003/diff/140001/google_apis/gcm/engine/gcm_store.h File google_apis/gcm/engine/gcm_store.h (right): https://codereview.chromium.org/1137463003/diff/140001/google_apis/gcm/engine/gcm_store.h#newcode85 google_apis/gcm/engine/gcm_store.h:85: virtual void AddRegistration(const std::string& serialized_key, On 2015/05/21 00:41:15, jianli ...
5 years, 7 months ago (2015-05-21 21:07:52 UTC) #13
jianli
https://codereview.chromium.org/1137463003/diff/140001/google_apis/gcm/engine/gcm_store.h File google_apis/gcm/engine/gcm_store.h (right): https://codereview.chromium.org/1137463003/diff/140001/google_apis/gcm/engine/gcm_store.h#newcode85 google_apis/gcm/engine/gcm_store.h:85: virtual void AddRegistration(const std::string& serialized_key, On 2015/05/21 21:07:51, Nicolas ...
5 years, 7 months ago (2015-05-21 23:11:25 UTC) #14
Nicolas Zea
https://codereview.chromium.org/1137463003/diff/180001/google_apis/gcm/engine/registration_request.h File google_apis/gcm/engine/registration_request.h (right): https://codereview.chromium.org/1137463003/diff/180001/google_apis/gcm/engine/registration_request.h#newcode93 google_apis/gcm/engine/registration_request.h:93: virtual void BuildRequestHeaders(std::string* extra_headers); On 2015/05/21 23:11:24, jianli wrote: ...
5 years, 7 months ago (2015-05-22 14:53:14 UTC) #15
jianli
I've updated to pass the request handler per discussion. Please review again. Thanks.
5 years, 7 months ago (2015-05-22 21:59:14 UTC) #16
Nicolas Zea
Thanks for making those changes, I think it looks much cleaner. gcm LGTM with some ...
5 years, 7 months ago (2015-05-26 16:39:15 UTC) #17
jianli
https://codereview.chromium.org/1137463003/diff/220001/google_apis/gcm/engine/gcm_unregistration_request_handler.h File google_apis/gcm/engine/gcm_unregistration_request_handler.h (right): https://codereview.chromium.org/1137463003/diff/220001/google_apis/gcm/engine/gcm_unregistration_request_handler.h#newcode8 google_apis/gcm/engine/gcm_unregistration_request_handler.h:8: #include "google_apis/gcm/engine/unregistration_request.h" On 2015/05/26 16:39:14, Nicolas Zea wrote: > ...
5 years, 7 months ago (2015-05-26 20:49:39 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1137463003/240001
5 years, 7 months ago (2015-05-26 20:52:20 UTC) #21
commit-bot: I haz the power
Committed patchset #12 (id:240001)
5 years, 7 months ago (2015-05-26 23:24:58 UTC) #22
commit-bot: I haz the power
5 years, 7 months ago (2015-05-26 23:25:57 UTC) #23
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/7a0c9b6d322d0a501fc114d3854df944fc059f0f
Cr-Commit-Position: refs/heads/master@{#331475}

Powered by Google App Engine
This is Rietveld 408576698