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

Issue 2729493004: Update Android site settings to display BLOCK for embargoed permissions. (Closed)

Created:
3 years, 9 months ago by dominickn
Modified:
3 years, 9 months ago
Reviewers:
gone
CC:
chromium-reviews, chrome-apps-syd-reviews_chromium.org, raymes
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Update Android site settings to display BLOCK for embargoed permissions. The permissions team has introduced a new temporary block state for permissions called embargo. Origins may be placed under this state if their prompts are dismissed too many times, or if they are blacklsited by Safe Browsing. Embargo is stored on a separate content settings type to avoid polluting the existing type for each permission. This CL updates the WebsitePreferenceBridge to query the PermissionManager and the PERMISSION_AUTOBLOCKER_DATA content settings type in order to properly display embargoed permissions as blocked in site settings on Android. A consequence of this change is that the GeolocationHeader tests began failing. This is because the implementation would fall back to querying for HTTP permission if HTTPS permission was ASK or not available. Since WebsitePreferenceBridge now queries the PermissionManager, geolocation permission is automatically blocked over non-HTTPS connections; it previously directly queried the HostContentSettingsMap. The code implementing the fallback and related comments have been removed as geolocation has been restricted to HTTPS origins since Chrome 50. Additionally, the preferences search engine test fails because it tries to check geolocation access for http://aol.com. That test is updated to use a different search engine for that part of the test (one that is available over HTTPS). BUG=679877 Review-Url: https://codereview.chromium.org/2729493004 Cr-Commit-Position: refs/heads/master@{#454456} Committed: https://chromium.googlesource.com/chromium/src/+/42dc98ada07c2bcd71a992aa289147dcc83f9881

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fix GeolocationHeaderTests #

Patch Set 3 : Excise more HTTP code #

Total comments: 4

Patch Set 4 : Fix PreferencesTest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -76 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeader.java View 1 3 chunks +3 lines, -19 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeaderTest.java View 1 2 2 chunks +5 lines, -14 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/preferences/PreferencesTest.java View 1 2 3 1 chunk +10 lines, -8 lines 0 comments Download
M chrome/browser/android/preferences/website_preference_bridge.cc View 1 2 3 6 chunks +73 lines, -35 lines 0 comments Download

Messages

Total messages: 29 (23 generated)
dominickn
Hey Dan, do you mind taking a look at this? Thanks!
3 years, 9 months ago (2017-03-02 06:50:56 UTC) #4
gone
lgtm https://codereview.chromium.org/2729493004/diff/1/chrome/browser/android/preferences/website_preference_bridge.cc File chrome/browser/android/preferences/website_preference_bridge.cc (right): https://codereview.chromium.org/2729493004/diff/1/chrome/browser/android/preferences/website_preference_bridge.cc#newcode162 chrome/browser/android/preferences/website_preference_bridge.cc:162: PermissionDecisionAutoBlocker* autoblocker = auto_blocker? https://codereview.chromium.org/2729493004/diff/40001/chrome/browser/android/preferences/website_preference_bridge.cc File chrome/browser/android/preferences/website_preference_bridge.cc (right): ...
3 years, 9 months ago (2017-03-02 17:05:26 UTC) #17
dominickn
PTAL - had to fix another dodgy test. Thanks! https://codereview.chromium.org/2729493004/diff/40001/chrome/browser/android/preferences/website_preference_bridge.cc File chrome/browser/android/preferences/website_preference_bridge.cc (right): https://codereview.chromium.org/2729493004/diff/40001/chrome/browser/android/preferences/website_preference_bridge.cc#newcode162 chrome/browser/android/preferences/website_preference_bridge.cc:162: ...
3 years, 9 months ago (2017-03-02 23:37:53 UTC) #23
gone
lgtm
3 years, 9 months ago (2017-03-03 00:15:54 UTC) #24
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/2729493004/60001
3 years, 9 months ago (2017-03-03 00:32:01 UTC) #26
commit-bot: I haz the power
3 years, 9 months ago (2017-03-03 01:37:48 UTC) #29
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/42dc98ada07c2bcd71a992aa2891...

Powered by Google App Engine
This is Rietveld 408576698