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

Issue 336313009: Showing devices transport method in one device (Closed)

Created:
6 years, 6 months ago by mhm
Modified:
6 years, 5 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

If an app/extension requests permission to access more than one type of devices (e.g. USB, Bluetooth and Serial) we should show one message listing the transport method(s). Currently we show a an install-time warning for each type of device the extension/app requests permission for. This is very excessive and this CL solves this problem by showing a single message that include the transport method. Currently we have three transport methods: Bluetooth, Serial and USB. We could show the following messages depending on the requested permissions: "Access your hardware devices connected via USB and Bluetooth" (how is this different than kHid?) "Access your hardware devices connected via USB and Serial" "Access your hardware devices connected via Bluetooth and Serial" and also keep the individual messages if only one category of hardware is requested. BUG=384353 R=jww, meacer, kalman Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281665

Patch Set 1 #

Total comments: 4

Patch Set 2 : Collabsed the string but included the transport #

Total comments: 3

Patch Set 3 : Cleaned the code and added tests #

Total comments: 26

Patch Set 4 : Removed HID from the list and ensured consistency with other strings. #

Total comments: 8

Patch Set 5 : Cleaned some code and added extra tests. #

Total comments: 7

Patch Set 6 : Modifying HID string and removing parantheses from strings. #

Total comments: 10

Patch Set 7 : Alphabetically ordered some of the code. Coealiscd one more case." #

Total comments: 6

Patch Set 8 : Fixing the style of using overriding instead of options and adding const when needed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+276 lines, -62 lines) Patch
M chrome/app/generated_resources.grd View 2 chunks +17 lines, -2 lines 0 comments Download
M chrome/common/extensions/permissions/chrome_permission_message_provider.cc View 1 2 3 4 5 6 7 3 chunks +118 lines, -57 lines 0 comments Download
M chrome/common/extensions/permissions/permission_set_unittest.cc View 1 2 3 4 5 6 7 3 chunks +126 lines, -2 lines 0 comments Download
A chrome/test/data/extensions/permissions/access_to_devices_bluetooth.json View 1 2 1 chunk +13 lines, -0 lines 0 comments Download
M extensions/common/permissions/permission_set.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M extensions/extensions_strings.grd View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 30 (0 generated)
mhm
jww@ and meacer@ can you please have a look at this for me.
6 years, 6 months ago (2014-06-18 01:33:56 UTC) #1
meacer
https://codereview.chromium.org/336313009/diff/1/chrome/common/extensions/permissions/chrome_permission_message_provider.cc File chrome/common/extensions/permissions/chrome_permission_message_provider.cc (right): https://codereview.chromium.org/336313009/diff/1/chrome/common/extensions/permissions/chrome_permission_message_provider.cc#newcode137 chrome/common/extensions/permissions/chrome_permission_message_provider.cc:137: case PermissionMessage::kUsbDevice: These should be kUsb and kBluetooth instead, ...
6 years, 6 months ago (2014-06-18 02:25:03 UTC) #2
mhm
> These should be kUsb and kBluetooth instead, as those are the permissions > allowing ...
6 years, 6 months ago (2014-06-18 17:42:32 UTC) #3
meacer
On 2014/06/18 17:42:32, mhm wrote: > > These should be kUsb and kBluetooth instead, as ...
6 years, 6 months ago (2014-06-18 17:52:13 UTC) #4
mhm
> Ah, I guess I misunderstood the purpose of this CL then. Looks like you ...
6 years, 6 months ago (2014-06-18 20:47:50 UTC) #5
not at google - send to devlin
double checking hardware permission semantics with rockot https://codereview.chromium.org/336313009/diff/1/chrome/common/extensions/permissions/chrome_permission_message_provider.cc File chrome/common/extensions/permissions/chrome_permission_message_provider.cc (right): https://codereview.chromium.org/336313009/diff/1/chrome/common/extensions/permissions/chrome_permission_message_provider.cc#newcode158 chrome/common/extensions/permissions/chrome_permission_message_provider.cc:158: } I ...
6 years, 6 months ago (2014-06-18 20:53:32 UTC) #6
mhm
> I think the upgrade path here is a bit weird. What if I install ...
6 years, 6 months ago (2014-06-18 21:05:03 UTC) #7
Ken Rockot(use gerrit already)
https://codereview.chromium.org/336313009/diff/1/chrome/common/extensions/permissions/chrome_permission_message_provider.cc File chrome/common/extensions/permissions/chrome_permission_message_provider.cc (right): https://codereview.chromium.org/336313009/diff/1/chrome/common/extensions/permissions/chrome_permission_message_provider.cc#newcode137 chrome/common/extensions/permissions/chrome_permission_message_provider.cc:137: case PermissionMessage::kUsbDevice: On 2014/06/18 02:25:02, Mustafa Emre Acer wrote: ...
6 years, 6 months ago (2014-06-18 21:06:17 UTC) #8
mhm
https://codereview.chromium.org/336313009/diff/1/chrome/common/extensions/permissions/chrome_permission_message_provider.cc File chrome/common/extensions/permissions/chrome_permission_message_provider.cc (right): https://codereview.chromium.org/336313009/diff/1/chrome/common/extensions/permissions/chrome_permission_message_provider.cc#newcode137 chrome/common/extensions/permissions/chrome_permission_message_provider.cc:137: case PermissionMessage::kUsbDevice: > kUsb and kBluetooth are correct, yes. ...
6 years, 6 months ago (2014-06-18 22:16:45 UTC) #9
not at google - send to devlin
On 2014/06/18 21:05:03, mhm wrote: > > I think the upgrade path here is a ...
6 years, 6 months ago (2014-06-19 22:21:01 UTC) #10
mhm
kalman@ can you please have a look at this for me. I have collapsed the ...
6 years, 6 months ago (2014-06-20 22:20:35 UTC) #11
not at google - send to devlin
accidentally reviewed this CL. oh wel. https://codereview.chromium.org/336313009/diff/20001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/336313009/diff/20001/chrome/app/generated_resources.grd#newcode4339 chrome/app/generated_resources.grd:4339: + Access your ...
6 years, 6 months ago (2014-06-20 22:23:02 UTC) #12
not at google - send to devlin
oh, I was supposed to review this. https://codereview.chromium.org/336313009/diff/20001/chrome/common/extensions/permissions/chrome_permission_message_provider.cc File chrome/common/extensions/permissions/chrome_permission_message_provider.cc (right): https://codereview.chromium.org/336313009/diff/20001/chrome/common/extensions/permissions/chrome_permission_message_provider.cc#newcode177 chrome/common/extensions/permissions/chrome_permission_message_provider.cc:177: l10n_util::GetStringUTF16(IDS_EXTENSION_PROMPT_WARNING_HID)); apparently ...
6 years, 6 months ago (2014-06-20 22:25:32 UTC) #13
not at google - send to devlin
I just realised something. This stuff needs to be tested.
6 years, 6 months ago (2014-06-20 22:35:14 UTC) #14
mhm
meacer@ can you please have a look at this for me. The code is now ...
6 years, 5 months ago (2014-07-02 23:41:33 UTC) #15
meacer
https://codereview.chromium.org/336313009/diff/40001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/336313009/diff/40001/chrome/app/generated_resources.grd#newcode4366 chrome/app/generated_resources.grd:4366: + Access your USB and Bluetooth device(s) HID devices ...
6 years, 5 months ago (2014-07-03 01:04:11 UTC) #16
meacer
https://codereview.chromium.org/336313009/diff/40001/chrome/common/extensions/permissions/chrome_permission_message_provider.cc File chrome/common/extensions/permissions/chrome_permission_message_provider.cc (right): https://codereview.chromium.org/336313009/diff/40001/chrome/common/extensions/permissions/chrome_permission_message_provider.cc#newcode212 chrome/common/extensions/permissions/chrome_permission_message_provider.cc:212: if (id == PermissionMessage::kMediaGalleriesAllGalleriesRead) { On 2014/07/03 01:04:11, Mustafa ...
6 years, 5 months ago (2014-07-03 01:09:59 UTC) #17
mhm
meacer@ can you please have a look at this for me. https://codereview.chromium.org/336313009/diff/40001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): ...
6 years, 5 months ago (2014-07-07 21:19:39 UTC) #18
meacer
https://codereview.chromium.org/336313009/diff/60001/chrome/common/extensions/permissions/chrome_permission_message_provider.cc File chrome/common/extensions/permissions/chrome_permission_message_provider.cc (right): https://codereview.chromium.org/336313009/diff/60001/chrome/common/extensions/permissions/chrome_permission_message_provider.cc#newcode48 chrome/common/extensions/permissions/chrome_permission_message_provider.cc:48: bool ContainBothMessages(T& messages, int first_message, int second_message) { Does ...
6 years, 5 months ago (2014-07-07 21:57:32 UTC) #19
mhm
Thanks for your earlier comments meacer@ Can you please have a look at this for ...
6 years, 5 months ago (2014-07-07 22:33:10 UTC) #20
meacer
Lgtm with questions and nits. https://codereview.chromium.org/336313009/diff/80001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/336313009/diff/80001/chrome/app/generated_resources.grd#newcode4366 chrome/app/generated_resources.grd:4366: + Access your input ...
6 years, 5 months ago (2014-07-07 22:38:27 UTC) #21
mhm
Hey kalman@ can you please have a look at this for me. https://codereview.chromium.org/336313009/diff/80001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd ...
6 years, 5 months ago (2014-07-07 22:50:05 UTC) #22
not at google - send to devlin
https://codereview.chromium.org/336313009/diff/100001/chrome/common/extensions/permissions/chrome_permission_message_provider.cc File chrome/common/extensions/permissions/chrome_permission_message_provider.cc (right): https://codereview.chromium.org/336313009/diff/100001/chrome/common/extensions/permissions/chrome_permission_message_provider.cc#newcode130 chrome/common/extensions/permissions/chrome_permission_message_provider.cc:130: // Access to USB, Bluetooth and Serial these little ...
6 years, 5 months ago (2014-07-07 23:07:39 UTC) #23
not at google - send to devlin
https://codereview.chromium.org/336313009/diff/80001/chrome/app/generated_resources.grd File chrome/app/generated_resources.grd (right): https://codereview.chromium.org/336313009/diff/80001/chrome/app/generated_resources.grd#newcode4369 chrome/app/generated_resources.grd:4369: + Access your USB and Bluetooth device(s) On 2014/07/07 ...
6 years, 5 months ago (2014-07-07 23:08:55 UTC) #24
mhm
kalman@ thanks for your earlier comments. I think I have addressed all of them in ...
6 years, 5 months ago (2014-07-07 23:58:33 UTC) #25
not at google - send to devlin
lgtm with some more changes https://codereview.chromium.org/336313009/diff/120001/chrome/common/extensions/permissions/chrome_permission_message_provider.cc File chrome/common/extensions/permissions/chrome_permission_message_provider.cc (right): https://codereview.chromium.org/336313009/diff/120001/chrome/common/extensions/permissions/chrome_permission_message_provider.cc#newcode47 chrome/common/extensions/permissions/chrome_permission_message_provider.cc:47: bool ContainsMessages(PermissionMessages& messages, also ...
6 years, 5 months ago (2014-07-08 00:07:57 UTC) #26
mhm
https://codereview.chromium.org/336313009/diff/120001/chrome/common/extensions/permissions/chrome_permission_message_provider.cc File chrome/common/extensions/permissions/chrome_permission_message_provider.cc (right): https://codereview.chromium.org/336313009/diff/120001/chrome/common/extensions/permissions/chrome_permission_message_provider.cc#newcode47 chrome/common/extensions/permissions/chrome_permission_message_provider.cc:47: bool ContainsMessages(PermissionMessages& messages, On 2014/07/08 00:07:56, kalman wrote: > ...
6 years, 5 months ago (2014-07-08 01:05:03 UTC) #27
mhm
The CQ bit was checked by mohammed@chromium.org
6 years, 5 months ago (2014-07-08 01:05:10 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mohammed@chromium.org/336313009/70007
6 years, 5 months ago (2014-07-08 01:06:07 UTC) #29
commit-bot: I haz the power
6 years, 5 months ago (2014-07-08 04:50:57 UTC) #30
Message was sent while issue was closed.
Change committed as 281665

Powered by Google App Engine
This is Rietveld 408576698