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

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

Issue 2014803002: Move DownloadControllerAndroid from content/ to chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved DownloadControllerAndroid(Impl) to chrome/ Created 4 years, 6 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
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 "base/feature_list.h" 7 #include "base/feature_list.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "chrome/browser/android/chrome_feature_list.h" 9 #include "chrome/browser/android/chrome_feature_list.h"
10 #include "chrome/browser/android/download/download_controller_android.h"
10 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade rs.h" 11 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_heade rs.h"
11 #include "content/public/browser/android/download_controller_android.h"
12 #include "content/public/browser/resource_controller.h" 12 #include "content/public/browser/resource_controller.h"
13 #include "net/http/http_request_headers.h" 13 #include "net/http/http_request_headers.h"
14 #include "net/http/http_response_headers.h" 14 #include "net/http/http_response_headers.h"
15 #include "net/url_request/url_request.h" 15 #include "net/url_request/url_request.h"
16 16
17 namespace { 17 namespace {
18 18
19 // UMA histogram for tracking reasons that chrome fails to intercept the 19 // UMA histogram for tracking reasons that chrome fails to intercept the
20 // download. Keep this in sync with MobileDownloadInterceptFailureReasons in 20 // download. Keep this in sync with MobileDownloadInterceptFailureReasons in
21 // histograms.xml. 21 // histograms.xml.
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 114
115 // If the cookie is possibly channel-bound, don't pass it to android download 115 // If the cookie is possibly channel-bound, don't pass it to android download
116 // manager. 116 // manager.
117 // TODO(qinmin): add a test for this. http://crbug.com/430541. 117 // TODO(qinmin): add a test for this. http://crbug.com/430541.
118 if (request_->ssl_info().channel_id_sent) { 118 if (request_->ssl_info().channel_id_sent) {
119 RecordInterceptFailureReasons(USE_CHANNEL_BOUND_COOKIES); 119 RecordInterceptFailureReasons(USE_CHANNEL_BOUND_COOKIES);
120 return; 120 return;
121 } 121 }
122 122
123 content::DownloadControllerAndroid::Get()->CreateGETDownload( 123 DownloadControllerAndroid::Get()->CreateGETDownload(
124 render_process_id_, render_view_id_, request_id_, must_download_); 124 render_process_id_, render_view_id_, request_id_, must_download_);
125 controller()->Cancel(); 125 controller()->Cancel();
126 RecordInterceptFailureReasons(NO_FAILURE); 126 RecordInterceptFailureReasons(NO_FAILURE);
127 } 127 }
128 128
129 } // namespace chrome 129 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698