Skip to content

Commit

Permalink
Revert of Bug fix in sampling whitelisted download. (patchset #1 id:1…
Browse files Browse the repository at this point in the history
… of https://codereview.chromium.org/1933333002/ )

Reason for revert:
breaking build

Original issue's description:
> Bug fix in sampling whitelisted download.
>
> BUG=553674
>
> Review URL: https://codereview.chromium.org/1911543002
>
> Cr-Commit-Position: refs/heads/master@{#388575}
> (cherry picked from commit 2c43aa6)
>
> Committed: https://chromium.googlesource.com/chromium/src/+/58147f61dd13f5cd511ff0e0f97c98bfd9558d26

TBR=
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=553674

Review-Url: https://codereview.chromium.org/1940463002
Cr-Commit-Position: refs/branch-heads/2661@{#651}
Cr-Branched-From: ef6f6ae-refs/heads/master@{#378081}
  • Loading branch information
jialiul authored and Commit bot committed Apr 29, 2016
1 parent 58147f6 commit dcaa12b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions chrome/browser/safe_browsing/download_protection_service.cc
Original file line number Diff line number Diff line change
Expand Up @@ -866,8 +866,8 @@ class DownloadProtectionService::CheckClientDownloadRequest
request.set_url(SanitizeUrl(item_->GetUrlChain().back()));
request.mutable_digests()->set_sha256(item_->GetHash());
request.set_length(item_->GetReceivedBytes());
request.set_skipped_url_whitelist(skipped_url_whitelist_);
request.set_skipped_certificate_whitelist(skipped_certificate_whitelist_);
request.set_skipped_url_whitelist(true);
request.set_skipped_certificate_whitelist(true);
for (size_t i = 0; i < item_->GetUrlChain().size(); ++i) {
ClientDownloadRequest::Resource* resource = request.add_resources();
resource->set_url(SanitizeUrl(item_->GetUrlChain()[i]));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,6 @@ TEST_F(DownloadProtectionServiceTest,

EXPECT_TRUE(IsResult(DownloadProtectionService::DANGEROUS));
EXPECT_TRUE(HasClientDownloadRequest());
EXPECT_FALSE(GetClientDownloadRequest()->skipped_url_whitelist());
EXPECT_FALSE(GetClientDownloadRequest()->skipped_certificate_whitelist());
ClearClientDownloadRequest();

// Check that the referrer is not matched against the whitelist.
Expand All @@ -660,8 +658,6 @@ TEST_F(DownloadProtectionServiceTest,

EXPECT_TRUE(IsResult(DownloadProtectionService::DANGEROUS));
EXPECT_TRUE(HasClientDownloadRequest());
EXPECT_FALSE(GetClientDownloadRequest()->skipped_url_whitelist());
EXPECT_FALSE(GetClientDownloadRequest()->skipped_certificate_whitelist());
ClearClientDownloadRequest();

// Redirect from a site shouldn't be checked either.
Expand All @@ -674,8 +670,6 @@ TEST_F(DownloadProtectionServiceTest,

EXPECT_TRUE(IsResult(DownloadProtectionService::DANGEROUS));
EXPECT_TRUE(HasClientDownloadRequest());
EXPECT_FALSE(GetClientDownloadRequest()->skipped_url_whitelist());
EXPECT_FALSE(GetClientDownloadRequest()->skipped_certificate_whitelist());
ClearClientDownloadRequest();

// Only if the final url is whitelisted should it be SAFE.
Expand Down

0 comments on commit dcaa12b

Please sign in to comment.