|
|
Created:
3 years, 7 months ago by Charlie Harrison Modified:
3 years, 7 months ago CC:
chromium-reviews, lgarron+watch_chromium.org, raymes+watch_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
Description[subresource_filter] Always display the default setting in Android Page Info
This patch also slightly reorders the setting to align with the ordering
defined in crbug.com/610358
BUG=689487
Review-Url: https://codereview.chromium.org/2874073002
Cr-Commit-Position: refs/heads/master@{#471963}
Committed: https://chromium.googlesource.com/chromium/src/+/d516a06227530ca47ccf5f872b334326e0137221
Patch Set 1 #
Total comments: 6
Patch Set 2 : add dep PS and refactor #
Depends on Patchset: Messages
Total messages: 25 (15 generated)
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Description was changed from ========== [subresource_filter] Display the default setting in Android Page Info BUG=689487 ========== to ========== [subresource_filter] Display the default setting in Android Page Info This patch also slightly reorders the setting to align with the ordering defined in crbug.com/610358 BUG=689487 ==========
Description was changed from ========== [subresource_filter] Display the default setting in Android Page Info This patch also slightly reorders the setting to align with the ordering defined in crbug.com/610358 BUG=689487 ========== to ========== [subresource_filter] Always display the default setting in Android Page Info This patch also slightly reorders the setting to align with the ordering defined in crbug.com/610358 BUG=689487 ==========
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
csharrison@chromium.org changed reviewers: + raymes@chromium.org
raymes: PTAL? This should probably land after https://codereview.chromium.org/2873313002/ but I'm not marking it a dependent PS to avoid the inevitable patch error babysitting. LMK if this isn't the right place to be making this policy decision.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2874073002/diff/1/chrome/browser/ui/android/p... File chrome/browser/ui/android/page_info/page_info_popup_android.cc (right): https://codereview.chromium.org/2874073002/diff/1/chrome/browser/ui/android/p... chrome/browser/ui/android/page_info/page_info_popup_android.cc:121: permissions_to_display.push_back(CONTENT_SETTINGS_TYPE_AUTOPLAY); Hmm, not sure I understand. I don't see autoplay or subresource filter in that bug? https://codereview.chromium.org/2874073002/diff/1/chrome/browser/ui/android/p... chrome/browser/ui/android/page_info/page_info_popup_android.cc:146: permission.default_setting; Not quite sure I understand this either? Shouldn't it just show the actual setting here?
https://codereview.chromium.org/2874073002/diff/1/chrome/browser/ui/android/p... File chrome/browser/ui/android/page_info/page_info_popup_android.cc (right): https://codereview.chromium.org/2874073002/diff/1/chrome/browser/ui/android/p... chrome/browser/ui/android/page_info/page_info_popup_android.cc:121: permissions_to_display.push_back(CONTENT_SETTINGS_TYPE_AUTOPLAY); On 2017/05/11 00:09:42, raymes wrote: > Hmm, not sure I understand. I don't see autoplay or subresource filter in that > bug? Sorry, the bug links to a document with all the relevant settings. I've just used it as a link because it's peppered throughout the settings UI code already when ordering comes up. https://codereview.chromium.org/2874073002/diff/1/chrome/browser/ui/android/p... chrome/browser/ui/android/page_info/page_info_popup_android.cc:146: permission.default_setting; On 2017/05/11 00:09:42, raymes wrote: > Not quite sure I understand this either? Shouldn't it just show the actual > setting here? That's what I'm attempting to do :) As far as I understand, this branch is taken if permission.setting == CONTENT_SETTING_DEFAULT, and permission.default_setting is the "actual" setting.
Thanks https://codereview.chromium.org/2874073002/diff/1/chrome/browser/ui/android/p... File chrome/browser/ui/android/page_info/page_info_popup_android.cc (right): https://codereview.chromium.org/2874073002/diff/1/chrome/browser/ui/android/p... chrome/browser/ui/android/page_info/page_info_popup_android.cc:121: permissions_to_display.push_back(CONTENT_SETTINGS_TYPE_AUTOPLAY); On 2017/05/11 00:15:34, Charlie Harrison wrote: > On 2017/05/11 00:09:42, raymes wrote: > > Hmm, not sure I understand. I don't see autoplay or subresource filter in that > > bug? > > Sorry, the bug links to a document with all the relevant settings. I've just > used it as a link because it's peppered throughout the settings UI code already > when ordering comes up. Ah I see, thanks. https://codereview.chromium.org/2874073002/diff/1/chrome/browser/ui/android/p... chrome/browser/ui/android/page_info/page_info_popup_android.cc:146: permission.default_setting; On 2017/05/11 00:15:34, Charlie Harrison wrote: > On 2017/05/11 00:09:42, raymes wrote: > > Not quite sure I understand this either? Shouldn't it just show the actual > > setting here? > > That's what I'm attempting to do :) > > As far as I understand, this branch is taken if permission.setting == > CONTENT_SETTING_DEFAULT, and permission.default_setting is the "actual" setting. Ah I see - thanks. It's quite subtle and I'm not super familiar with this code. Maybe we could reorder this code to make it a bit clearer? if (permission.type == GEOLOCATION) { if (permission.setting == DEFAULT) .. else .. } else if (permission.type == SUBRESOURCE_FILTER) { if (permission.setting == DEFAULT) .. else .. } else { // Only show most permissions if they are in a non-default state. if (permission.setting != DEFAULT) .. } It's more verbose but I think clearer. WDYT? I'm assuming you've tested that the ShouldShowPermission check applies to the list passed in here (I haven't looked closely).
The CQ bit was checked by csharrison@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
raymes: I ended up refactoring some logic into a separate private method. WDYT?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
non-owner lgtm, thanks for the cleanup. Is there a way to test this?
csharrison@chromium.org changed reviewers: + tedchoc@chromium.org
tedchoc: Could you PTAL as an android ui owner? raymes: I couldn't find a way to unit test this change without adding some meaty infrastructure changes but possibly there's a way to spin up the browser and confirm these UI elements exist? tedchoc can you help advise?
lgtm
The CQ bit was checked by csharrison@chromium.org
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 20001, "attempt_start_ts": 1494889721659360, "parent_rev": "63e2b3c73a2be03b588f73b80f45bb1141133ade", "commit_rev": "d516a06227530ca47ccf5f872b334326e0137221"}
Message was sent while issue was closed.
Description was changed from ========== [subresource_filter] Always display the default setting in Android Page Info This patch also slightly reorders the setting to align with the ordering defined in crbug.com/610358 BUG=689487 ========== to ========== [subresource_filter] Always display the default setting in Android Page Info This patch also slightly reorders the setting to align with the ordering defined in crbug.com/610358 BUG=689487 Review-Url: https://codereview.chromium.org/2874073002 Cr-Commit-Position: refs/heads/master@{#471963} Committed: https://chromium.googlesource.com/chromium/src/+/d516a06227530ca47ccf5f872b33... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/d516a06227530ca47ccf5f872b33... |