Advance the 'permission is off in Android' handling for Site Settings.
This CL does two things:
1) Handle the user-facing messaging better for GeoLocation. If GeoLocation is turned off both globally and per-app (for Chrome) we now show (at the top of both WebsitePreferences and SingleWebsitePreferences):
Turn on permission for Chrome in <link>Android Settings</link>.
Location access is also <link>turned off for this device</link>.
If GeoLocation is turned off only globally, we show only the second line (and drop the word 'also).
If GeoLocation is turned off only per-app, we show only the first line.
Before this CL, we'd only show the first line (even if GeoLocation was off globally), but the target would be different based on how GeoLocation was disabled. This was confusing e.g. if both were off (you wouldn't know beforehand where you'd be taken) and once you'd enabled you have the same message visible but with a different target.
2) This CL is also an attempt to simplify the logic in WebsitePreferences by refactoring a bit which enables us to remove the special-casing in WebsitePreferences (we had a lot of statements like: if geolocation, then show this message -- but not when geolocation is off by policy, etc). By leveraging the PermissionInfo class, we can simplify the logic and make it much more general and hopefully more extensible if Android decides to add more Per-app permissions.
BUG=499398
Review URL: https://codereview.chromium.org/
1213893004
Cr-Commit-Position: refs/heads/master@{#338268}