Index: chrome/browser/android/intercept_download_resource_throttle.cc |
diff --git a/chrome/browser/android/intercept_download_resource_throttle.cc b/chrome/browser/android/intercept_download_resource_throttle.cc |
index d95674418f381ac815c41fb6184ab1543aa83641..d71bdcf20aa36fff589fc47bacf6b2c9f6843630 100644 |
--- a/chrome/browser/android/intercept_download_resource_throttle.cc |
+++ b/chrome/browser/android/intercept_download_resource_throttle.cc |
@@ -53,14 +53,16 @@ void InterceptDownloadResourceThrottle::ProcessDownloadRequest() { |
if (request_->method() != net::HttpRequestHeaders::kGetMethod) |
return; |
+ net::HttpRequestHeaders headers; |
+ if (!request_->GetFullRequestHeaders(&headers)) |
+ return; |
+ |
// In general, if the request uses HTTP authorization, either with the origin |
// or a proxy, then the network stack should handle the download. The one |
// exception is a request that is fetched via the Chrome Proxy and does not |
// authenticate with the origin. |
if (request_->response_info().did_use_http_auth) { |
#if defined(SPDY_PROXY_AUTH_ORIGIN) |
- net::HttpRequestHeaders headers; |
- request_->GetFullRequestHeaders(&headers); |
if (headers.HasHeader(net::HttpRequestHeaders::kAuthorization) || |
!(request_->response_info().headers && |
data_reduction_proxy::HasDataReductionProxyViaHeader( |