Commit c06cfbb2 authored by Rouslan Solomakhin's avatar Rouslan Solomakhin Committed by Commit Bot

[Payments] Don't print empty URL in warning.

Before this patch, missing HTTP Link header for payment method manifest
would result in the following error messages in console:

  Unable to make a HEAD request to https://foo for payment method manifest.
   is not a valid payment method manifest URL.

This patch hides the second error message when the payment method
manifest URL is empty.

After this patch, missing HTTP Link header for payment method manifest
results in the following error message in console:

  Unable to make a HEAD request to https://foo for payment method manifest.

Bug: NONE
Change-Id: I83adced7779b692e81395c660e706f18269c1357
Reviewed-on: https://chromium-review.googlesource.com/962879Reviewed-by: default avataranthonyvd <anthonyvd@chromium.org>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543141}
parent ea278e7b
...@@ -128,7 +128,10 @@ void PaymentManifestDownloader::OnURLFetchComplete( ...@@ -128,7 +128,10 @@ void PaymentManifestDownloader::OnURLFetchComplete(
InitiateDownload(url, net::URLFetcher::GET, InitiateDownload(url, net::URLFetcher::GET,
std::move(download->callback)); std::move(download->callback));
} else { } else {
LOG(ERROR) << url << " is not a valid payment method manifest URL."; // If the URL is empty, then ParseResponseHeader() has already printed an
// explanation.
if (!url.is_empty())
LOG(ERROR) << url << " is not a valid payment method manifest URL.";
std::move(download->callback).Run(std::string()); std::move(download->callback).Run(std::string());
} }
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment