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

Side by Side Diff: content/browser/android/download_controller_android_impl.cc

Issue 12569007: Remove URL fragment from referrer HTTP header when opening link using "Open Link in New Tab" option. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert testserver.py changes Created 7 years, 9 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 | Annotate | Revision Log
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 "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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698