Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(713)

Side by Side Diff: chrome/browser/android/intercept_download_resource_throttle.cc

Issue 634683002: Remove implicit conversions from scoped_refptr to T* in chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/android/intercept_download_resource_throttle.h" 5 #include "chrome/browser/android/intercept_download_resource_throttle.h"
6 6
7 #include "components/data_reduction_proxy/common/data_reduction_proxy_headers.h" 7 #include "components/data_reduction_proxy/common/data_reduction_proxy_headers.h"
8 #include "content/public/browser/android/download_controller_android.h" 8 #include "content/public/browser/android/download_controller_android.h"
9 #include "content/public/browser/resource_controller.h" 9 #include "content/public/browser/resource_controller.h"
10 #include "net/http/http_request_headers.h" 10 #include "net/http/http_request_headers.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 net::HttpRequestHeaders headers; 49 net::HttpRequestHeaders headers;
50 if (!request_->GetFullRequestHeaders(&headers)) 50 if (!request_->GetFullRequestHeaders(&headers))
51 return; 51 return;
52 52
53 // In general, if the request uses HTTP authorization, either with the origin 53 // In general, if the request uses HTTP authorization, either with the origin
54 // or a proxy, then the network stack should handle the download. The one 54 // or a proxy, then the network stack should handle the download. The one
55 // exception is a request that is fetched via the Chrome Proxy and does not 55 // exception is a request that is fetched via the Chrome Proxy and does not
56 // authenticate with the origin. 56 // authenticate with the origin.
57 if (request_->response_info().did_use_http_auth) { 57 if (request_->response_info().did_use_http_auth) {
58 if (headers.HasHeader(net::HttpRequestHeaders::kAuthorization) || 58 if (headers.HasHeader(net::HttpRequestHeaders::kAuthorization) ||
59 !(request_->response_info().headers && 59 !(request_->response_info().headers.get() &&
60 data_reduction_proxy::HasDataReductionProxyViaHeader( 60 data_reduction_proxy::HasDataReductionProxyViaHeader(
61 request_->response_info().headers, NULL))) { 61 request_->response_info().headers.get(), NULL))) {
62 return; 62 return;
63 } 63 }
64 } 64 }
65 65
66 content::DownloadControllerAndroid::Get()->CreateGETDownload( 66 content::DownloadControllerAndroid::Get()->CreateGETDownload(
67 render_process_id_, render_view_id_, request_id_); 67 render_process_id_, render_view_id_, request_id_);
68 controller()->Cancel(); 68 controller()->Cancel();
69 } 69 }
70 70
71 } // namespace chrome 71 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698