| OLD | NEW |
| 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 "content/browser/android/download_controller_android_impl.h" | 5 #include "content/browser/android/download_controller_android_impl.h" |
| 6 | 6 |
| 7 #include "base/android/jni_android.h" | 7 #include "base/android/jni_android.h" |
| 8 #include "base/android/jni_string.h" | 8 #include "base/android/jni_string.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 | 341 |
| 342 DownloadControllerAndroidImpl::DownloadInfoAndroid::DownloadInfoAndroid( | 342 DownloadControllerAndroidImpl::DownloadInfoAndroid::DownloadInfoAndroid( |
| 343 net::URLRequest* request) { | 343 net::URLRequest* request) { |
| 344 request->GetResponseHeaderByName("content-disposition", &content_disposition); | 344 request->GetResponseHeaderByName("content-disposition", &content_disposition); |
| 345 | 345 |
| 346 if (request->response_headers()) | 346 if (request->response_headers()) |
| 347 request->response_headers()->GetMimeType(&original_mime_type); | 347 request->response_headers()->GetMimeType(&original_mime_type); |
| 348 | 348 |
| 349 request->extra_request_headers().GetHeader( | 349 request->extra_request_headers().GetHeader( |
| 350 net::HttpRequestHeaders::kUserAgent, &user_agent); | 350 net::HttpRequestHeaders::kUserAgent, &user_agent); |
| 351 GURL referer_url(request->GetSanitizedReferrer()); | 351 GURL referer_url(request->referrer()); |
| 352 if (referer_url.is_valid()) | 352 if (referer_url.is_valid()) |
| 353 referer = referer_url.spec(); | 353 referer = referer_url.spec(); |
| 354 if (!request->url_chain().empty()) { | 354 if (!request->url_chain().empty()) { |
| 355 original_url = request->url_chain().front(); | 355 original_url = request->url_chain().front(); |
| 356 url = request->url_chain().back(); | 356 url = request->url_chain().back(); |
| 357 } | 357 } |
| 358 } | 358 } |
| 359 | 359 |
| 360 DownloadControllerAndroidImpl::DownloadInfoAndroid::~DownloadInfoAndroid() {} | 360 DownloadControllerAndroidImpl::DownloadInfoAndroid::~DownloadInfoAndroid() {} |
| 361 | 361 |
| 362 } // namespace content | 362 } // namespace content |
| OLD | NEW |