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

Issue 2111973002: Add support for GCM subtypes to desktop Instance ID implementation (Closed)

Created:
4 years, 5 months ago by johnme
Modified:
4 years, 4 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, cbentzel+watch_chromium.org, droger+watchlist_chromium.org, zea+watch_chromium.org, Peter Beverloo, blundell+watchlist_chromium.org, johnme+watch_chromium.org, sdefresne+watchlist_chromium.org, chromium-apps-reviews_chromium.org, harkness+watch_chromium.org, Miguel Garcia
Base URL:
https://chromium.googlesource.com/chromium/src.git@iid9push
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add support for GCM subtypes to desktop Instance ID implementation Adds support for subtypes to the desktop Instance ID implementation. A follow-on patch will switch Web Push to use subtypes on desktop. Chrome Apps/Extensions will be unchanged. The main benefit will be consistency between desktop and Android - both will be able to use subtypes for the app_id, rather than sending app_id to GCM as the category field (package name) on desktop only. This will avoid spamming GCM's category column with many unique values (since each app_id that Push generates contains a random GUID). Part of a series of patches: 1. https://codereview.chromium.org/1832833002 adds InstanceIDWithSubtype 2. https://codereview.chromium.org/1830983002 adds JNI bindings 3. https://codereview.chromium.org/1829023002 adds fake and test 4. https://codereview.chromium.org/1899753002 fixes strict mode violations 5. https://codereview.chromium.org/1854093002 enables InstanceID by default 6. https://codereview.chromium.org/1953273002 extends the GCMKeyStore 7. https://codereview.chromium.org/1923953002 integrates IIDs with crypto 8. this patch 9. https://codereview.chromium.org/1851423003 switches Push to InstanceIDs Also depends on - https://codereview.chromium.org/2148163003 fix test asserts - https://codereview.chromium.org/2217803003 EXPECT_DCHECK BUG=533498, 589461 Committed: https://crrev.com/627dc8c76a66a8c6251c6d0423e8782b101bb050 Cr-Commit-Position: refs/heads/master@{#413259}

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Remove bool param from InstanceIDDriver, and warn during death tests #

Patch Set 4 : Rebase onto https://codereview.chromium.org/2148163003 #

Patch Set 5 : address most of peter's concerns #

Total comments: 26

Patch Set 6 : Address review comments #

Total comments: 18

Patch Set 7 : Address nits #

Patch Set 8 : Fix iOS compile #

Total comments: 6

Patch Set 9 : Fix thestig nits and Chrome OS compile #

Total comments: 10

Patch Set 10 : InstanceIDDriverTest shouldn't use GetInstanceIDForExtensions on AndrAndroid #

Patch Set 11 : Address jianli's review comments #

Total comments: 19

Patch Set 12 : Remove channel from product_category_for_subtypes, and address nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+775 lines, -308 lines) Patch
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_gcm_app_handler_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +10 lines, -9 lines 0 comments Download
A chrome/browser/services/gcm/gcm_product_util.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +30 lines, -0 lines 0 comments Download
A chrome/browser/services/gcm/gcm_product_util.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +57 lines, -0 lines 0 comments Download
M chrome/browser/services/gcm/gcm_profile_service_factory.cc View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -1 line 0 comments Download
M chrome/browser/services/gcm/gcm_profile_service_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +5 lines, -0 lines 0 comments Download
M components/gcm_driver.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -1 line 0 comments Download
M components/gcm_driver/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +5 lines, -1 line 0 comments Download
M components/gcm_driver/DEPS View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M components/gcm_driver/fake_gcm_client.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M components/gcm_driver/fake_gcm_client.cc View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M components/gcm_driver/gcm_client.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M components/gcm_driver/gcm_client_impl.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -1 line 0 comments Download
M components/gcm_driver/gcm_client_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 chunks +91 lines, -32 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 21 chunks +303 lines, -107 lines 0 comments Download
M components/gcm_driver/gcm_desktop_utils.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M components/gcm_driver/gcm_desktop_utils.cc 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_driver.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +2 lines, -4 lines 0 comments Download
M components/gcm_driver/gcm_driver_desktop_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -1 line 0 comments Download
M components/gcm_driver/gcm_profile_service.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M components/gcm_driver/gcm_profile_service.cc View 1 2 3 4 5 6 2 chunks +6 lines, -4 lines 0 comments Download
M components/gcm_driver/instance_id/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M components/gcm_driver/instance_id/instance_id.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -3 lines 0 comments Download
M components/gcm_driver/instance_id/instance_id_android.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -2 lines 0 comments Download
M components/gcm_driver/instance_id/instance_id_driver.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M components/gcm_driver/instance_id/instance_id_driver.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M components/gcm_driver/instance_id/instance_id_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -2 lines 0 comments Download
M components/gcm_driver/registration_info.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M components/gcm_driver/registration_info.cc View 1 2 3 4 5 6 7 8 9 10 5 chunks +11 lines, -10 lines 0 comments Download
M google_apis/gcm/engine/gcm_request_test_base.h View 1 chunk +6 lines, -0 lines 0 comments Download
M google_apis/gcm/engine/gcm_request_test_base.cc View 1 chunk +20 lines, -0 lines 0 comments Download
M google_apis/gcm/engine/instance_id_delete_token_request_handler.cc View 2 chunks +0 lines, -4 lines 0 comments Download
M google_apis/gcm/engine/instance_id_get_token_request_handler.cc View 2 chunks +0 lines, -4 lines 0 comments Download
M google_apis/gcm/engine/registration_request.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +12 lines, -3 lines 0 comments Download
M google_apis/gcm/engine/registration_request.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +23 lines, -21 lines 0 comments Download
M google_apis/gcm/engine/registration_request_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 10 chunks +45 lines, -25 lines 0 comments Download
M google_apis/gcm/engine/unregistration_request.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +10 lines, -3 lines 0 comments Download
M google_apis/gcm/engine/unregistration_request.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +24 lines, -18 lines 0 comments Download
M google_apis/gcm/engine/unregistration_request_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 chunks +40 lines, -44 lines 0 comments Download
M ios/chrome/browser/application_context_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +3 lines, -0 lines 0 comments Download
M ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +8 lines, -0 lines 0 comments Download
M ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 58 (30 generated)
johnme
+peter for first pass
4 years, 5 months ago (2016-07-05 15:18:56 UTC) #3
Peter Beverloo
Thank you for the CL, John! First things first- this CL introduces a very significant ...
4 years, 5 months ago (2016-07-08 13:21:06 UTC) #4
johnme
On 2016/07/08 13:21:06, Peter Beverloo wrote: > Thank you for the CL, John! > > ...
4 years, 5 months ago (2016-07-13 15:39:59 UTC) #5
johnme
Made a bunch of modifications to simplify this CL: - Now generates the default category ...
4 years, 5 months ago (2016-07-19 18:39:01 UTC) #7
Peter Beverloo
This looks much better already, thanks! A few comments; https://codereview.chromium.org/2111973002/diff/80001/components/gcm_driver.gypi File components/gcm_driver.gypi (right): https://codereview.chromium.org/2111973002/diff/80001/components/gcm_driver.gypi#newcode37 components/gcm_driver.gypi:37: ...
4 years, 5 months ago (2016-07-22 12:17:04 UTC) #8
johnme
Addressed review comments - thanks! https://codereview.chromium.org/2111973002/diff/80001/components/gcm_driver.gypi File components/gcm_driver.gypi (right): https://codereview.chromium.org/2111973002/diff/80001/components/gcm_driver.gypi#newcode37 components/gcm_driver.gypi:37: '../third_party/re2/re2.gyp:re2', On 2016/07/22 12:17:03, ...
4 years, 4 months ago (2016-07-26 17:11:56 UTC) #9
Peter Beverloo
lgtm % nits https://codereview.chromium.org/2111973002/diff/80001/components/gcm_driver/registration_info.h File components/gcm_driver/registration_info.h (right): https://codereview.chromium.org/2111973002/diff/80001/components/gcm_driver/registration_info.h#newcode114 components/gcm_driver/registration_info.h:114: // are not serialized/deserialized! On 2016/07/26 ...
4 years, 4 months ago (2016-07-28 12:34:10 UTC) #10
johnme
Addressed nits - thanks! https://codereview.chromium.org/2111973002/diff/80001/components/gcm_driver/registration_info.h File components/gcm_driver/registration_info.h (right): https://codereview.chromium.org/2111973002/diff/80001/components/gcm_driver/registration_info.h#newcode114 components/gcm_driver/registration_info.h:114: // are not serialized/deserialized! On ...
4 years, 4 months ago (2016-08-04 17:47:14 UTC) #11
johnme
droger, please review: - ios/chrome/browser/application_context_impl.cc thestig, please review: - chrome/browser/browser_process_impl.cc - chrome/browser/extensions/ - chrome/browser/prefs/browser_prefs.cc Thanks!
4 years, 4 months ago (2016-08-05 14:23:11 UTC) #20
Lei Zhang
I see red bots. https://codereview.chromium.org/2111973002/diff/140001/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc File chrome/browser/extensions/extension_gcm_app_handler_unittest.cc (right): https://codereview.chromium.org/2111973002/diff/140001/chrome/browser/extensions/extension_gcm_app_handler_unittest.cc#newcode38 chrome/browser/extensions/extension_gcm_app_handler_unittest.cc:38: #include "chrome/common/chrome_version.h" ditto ditto https://codereview.chromium.org/2111973002/diff/140001/chrome/browser/services/gcm/gcm_profile_service_factory.cc ...
4 years, 4 months ago (2016-08-05 15:37:08 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2111973002/160001
4 years, 4 months ago (2016-08-08 12:52:57 UTC) #26
johnme
> I see red bots. I fixed the Chrome OS bots that were red; now ...
4 years, 4 months ago (2016-08-08 18:22:05 UTC) #32
Lei Zhang
chrome/ lgtm. Not sure if the red Android bots are yours.
4 years, 4 months ago (2016-08-08 19:14:53 UTC) #33
jianli
I've not read all the codes yet. But based on my 1st read, it seems ...
4 years, 4 months ago (2016-08-08 22:11:51 UTC) #35
johnme
Thanks Jian, addressed your comments. https://codereview.chromium.org/2111973002/diff/160001/chrome/browser/services/gcm/gcm_product_util.cc File chrome/browser/services/gcm/gcm_product_util.cc (right): https://codereview.chromium.org/2111973002/diff/160001/chrome/browser/services/gcm/gcm_product_util.cc#newcode35 chrome/browser/services/gcm/gcm_product_util.cc:35: prefs->GetString(prefs::kGCMProductCategoryForSubtypes); On 2016/08/08 22:11:51, ...
4 years, 4 months ago (2016-08-10 13:09:55 UTC) #36
johnme
On 2016/08/08 22:11:51, jianli wrote: > I've not read all the codes yet. But based ...
4 years, 4 months ago (2016-08-10 13:11:38 UTC) #37
droger
LGTM but please consider the comment below. In general, sharing code should be better. https://codereview.chromium.org/2111973002/diff/200001/ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc ...
4 years, 4 months ago (2016-08-16 08:05:23 UTC) #38
Nicolas Zea
LG with some nits and a question https://codereview.chromium.org/2111973002/diff/200001/components/gcm_driver/DEPS File components/gcm_driver/DEPS (right): https://codereview.chromium.org/2111973002/diff/200001/components/gcm_driver/DEPS#newcode12 components/gcm_driver/DEPS:12: "+content/public/android/java", My ...
4 years, 4 months ago (2016-08-17 20:54:09 UTC) #40
jianli
lgtm https://codereview.chromium.org/2111973002/diff/200001/chrome/browser/services/gcm/gcm_product_util.h File chrome/browser/services/gcm/gcm_product_util.h (right): https://codereview.chromium.org/2111973002/diff/200001/chrome/browser/services/gcm/gcm_product_util.h#newcode19 chrome/browser/services/gcm/gcm_product_util.h:19: // Returns a string like "com.chrome.stable.macosx" that should ...
4 years, 4 months ago (2016-08-17 21:12:08 UTC) #41
johnme
Thanks all! Addressed review comments. https://codereview.chromium.org/2111973002/diff/200001/chrome/browser/services/gcm/gcm_product_util.h File chrome/browser/services/gcm/gcm_product_util.h (right): https://codereview.chromium.org/2111973002/diff/200001/chrome/browser/services/gcm/gcm_product_util.h#newcode19 chrome/browser/services/gcm/gcm_product_util.h:19: // Returns a string ...
4 years, 4 months ago (2016-08-18 17:43:22 UTC) #42
Nicolas Zea
lgtm
4 years, 4 months ago (2016-08-18 20:00:20 UTC) #43
droger
https://codereview.chromium.org/2111973002/diff/200001/ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc File ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc (right): https://codereview.chromium.org/2111973002/diff/200001/ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc#newcode44 ios/chrome/browser/services/gcm/ios_chrome_gcm_profile_service_factory.cc:44: #endif On 2016/08/18 17:43:22, johnme wrote: > On 2016/08/16 ...
4 years, 4 months ago (2016-08-19 09:10:28 UTC) #44
johnme
asargent: please give OWNERS approval for components/gcm_driver/DEPS dep on components/crx_file (just to validate extension IDs) ...
4 years, 4 months ago (2016-08-19 19:21:42 UTC) #46
asargent_no_longer_on_chrome
adding dep on components/crx_file lgtm
4 years, 4 months ago (2016-08-19 19:56:55 UTC) #49
Ted C
On 2016/08/19 19:56:55, Antony Sargent wrote: > adding dep on components/crx_file lgtm components/gcm_driver/DEPS - lgtm
4 years, 4 months ago (2016-08-19 21:00:43 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2111973002/220001
4 years, 4 months ago (2016-08-19 21:31:12 UTC) #54
commit-bot: I haz the power
Committed patchset #12 (id:220001)
4 years, 4 months ago (2016-08-19 21:50:08 UTC) #56
commit-bot: I haz the power
4 years, 4 months ago (2016-08-19 21:52:49 UTC) #58
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/627dc8c76a66a8c6251c6d0423e8782b101bb050
Cr-Commit-Position: refs/heads/master@{#413259}

Powered by Google App Engine
This is Rietveld 408576698