New issue
Advanced search Search tips

Issue 862109 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task



Sign in to add a comment

Move URLBlacklist policy code from //components/policy to //chrome/browser/policy

Project Member Reported by pmarko@chromium.org, Jul 10

Issue description

URLBlacklist is a browser-specific policy, there's no reason IIUC for its implementation to live in //components/policy.

//components/policy should contains general policy infrastructure, and not implementation of the behavior of specific policies.
 
It seems that the main issue is:

** Presubmit ERRORS **
You added one or more #includes that violate checkdeps rules.
  android_webview/browser/aw_browser_context.cc
      Illegal include: "chrome/browser/policy/url_blacklist/url_blacklist_manager.h"
    Because of no rule applying. \
  android_webview/browser/aw_browser_policy_connector.cc
      Illegal include: "chrome/browser/policy/url_blacklist/url_blacklist_policy_handler.h"
    Because of no rule applying.

which means that the code is (probably) used from both Android WebView and Chrome.

Android WebView has a checkdeps policy of not allowing any dependencies on //chrome.

Actually, only a handful of policies are used in Android WebView:
https://cs.chromium.org/chromium/src/android_webview/browser/aw_browser_policy_connector.cc?rcl=2932b8bf7174dbd4ca26a7a8c162962824b15233&l=33
( see also supported_on 'webview_android' in policy_templates.json )

So the code for URL blacklist (including the 'throttle' - https://cs.chromium.org/chromium/src/android_webview/browser/aw_content_browser_client.cc?rcl=2932b8bf7174dbd4ca26a7a8c162962824b15233&l=46) must live in something that can be shared between chrome and android_webview.

Maybe this can be //components/policy after all - we'll have to find out what to do with this when migrating to a policy service.

Comment 2 Deleted

For archival purposes, here's the CL (uploaded with --bypass-hooks) in case we decide to move the code (to somewhere accessible from both //chrome and //android_webview).

https://chromium-review.googlesource.com/c/chromium/src/+/1133395

Sign in to add a comment