Chromium Code Reviews| Index: chrome/browser/safe_browsing/download_protection_service.cc |
| diff --git a/chrome/browser/safe_browsing/download_protection_service.cc b/chrome/browser/safe_browsing/download_protection_service.cc |
| index 473dc5348dfdb212a1c46065a7802e2c29237a93..863a82812ffa24dccb8f362c2a5f9e25e171dd1d 100644 |
| --- a/chrome/browser/safe_browsing/download_protection_service.cc |
| +++ b/chrome/browser/safe_browsing/download_protection_service.cc |
| @@ -660,7 +660,7 @@ class DownloadProtectionService::CheckClientDownloadRequest |
| VLOG(2) << "Sending a request for URL: " |
| << item_->GetUrlChain().back(); |
| fetcher_.reset(net::URLFetcher::Create(0 /* ID used for testing */, |
| - GURL(GetDownloadRequestUrl()), |
| + GetDownloadRequestUrl(), |
| net::URLFetcher::POST, |
| this)); |
| fetcher_->SetLoadFlags(net::LOAD_DISABLE_CACHE); |
| @@ -967,12 +967,12 @@ void DownloadProtectionService::GetCertificateWhitelistStrings( |
| } |
| // static |
| -std::string DownloadProtectionService::GetDownloadRequestUrl() { |
| - std::string url = kDownloadRequestUrl; |
| +GURL DownloadProtectionService::GetDownloadRequestUrl() { |
| + GURL url(kDownloadRequestUrl); |
| std::string api_key = google_apis::GetAPIKey(); |
| if (!api_key.empty()) { |
| - base::StringAppendF(&url, "?key=%s", |
| - net::EscapeQueryParamValue(api_key, true).c_str()); |
| + url = url.Resolve(base::StringPrintf( |
|
akalin
2013/09/19 18:54:00
use string+ instead of StringPrintF
Mattias Nissler (ping if slow)
2013/09/20 15:33:53
Done.
|
| + "?key=%s", net::EscapeQueryParamValue(api_key, true).c_str())); |
| } |
| return url; |
| } |