Code: void CheckClientDownloadRequest::UploadBinary(
    DownloadCheckResult result,
    DownloadCheckResultReason reason) {
  saved_result_ = result;
  saved_reason_ = reason;

  bool upload_for_dlp = ShouldUploadForDlpScan();
  bool upload_for_malware = ShouldUploadForMalwareScan(reason);
  auto request = std::make_unique<DownloadItemRequest>(
      item_, /*read_immediately=*/true,
      base::BindOnce(&CheckClientDownloadRequest::OnDeepScanningComplete,
                     weakptr_factory_.GetWeakPtr()));

  Profile* profile = Profile::FromBrowserContext(GetBrowserContext());

  if (upload_for_dlp) {
    DlpDeepScanningClientRequest dlp_request;
    dlp_request.set_content_source(DlpDeepScanningClientRequest::FILE_DOWNLOAD);
    request->set_request_dlp_scan(std::move(dlp_request));
  }

  if (upload_for_malware) {
    MalwareDeepScanningClientRequest malware_request;
    malware_request.set_population(
        MalwareDeepScanningClientRequest::POPULATION_ENTERPRISE);
    malware_request.set_download_token(
        DownloadProtectionService::GetDownloadPingToken(item_));
     request->set_request_malware_scan(std::move(malware_request));
   }
 
  request->set_dm_token(
      policy::BrowserDMTokenStorage::Get()->RetrieveDMToken());
 
   service()->UploadForDeepScanning(profile, std::move(request));
 }

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}