Code: bool CheckClientDownloadRequest::ShouldUploadForDlpScan() {
  if (!base::FeatureList::IsEnabled(kDeepScanningOfDownloads))
    return false;

  int check_content_compliance = g_browser_process->local_state()->GetInteger(
      prefs::kCheckContentCompliance);
  if (check_content_compliance !=
          CheckContentComplianceValues::CHECK_DOWNLOADS &&
      check_content_compliance !=
           CheckContentComplianceValues::CHECK_UPLOADS_AND_DOWNLOADS)
     return false;
 
  if (policy::BrowserDMTokenStorage::Get()->RetrieveDMToken().empty())
     return false;
 
   const base::ListValue* domains = g_browser_process->local_state()->GetList(
      prefs::kURLsToCheckComplianceOfDownloadedContent);
  url_matcher::URLMatcher matcher;
  policy::url_util::AddAllowFilters(&matcher, domains);
  return !matcher.MatchURL(item_->GetURL()).empty();
}

Vulnerability Type: 
CWE ID: CWE-20
Summary: Insufficient Policy Enforcement in Omnibox in Google Chrome prior to 59.0.3071.104 for Mac allowed a remote attacker to perform domain spoofing via a crafted domain name.
Commit Message: Migrate download_protection code to new DM token class.

Migrates RetrieveDMToken calls to use the new BrowserDMToken class.

Bug: 1020296
Change-Id: Icef580e243430d73b6c1c42b273a8540277481d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1904234
Commit-Queue: Dominique Fauteux-Chapleau <domfc@chromium.org>
Reviewed-by: Tien Mai <tienmai@chromium.org>
Reviewed-by: Daniel Rubery <drubery@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714196}