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

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: sync up to rev 193385 Created 7 years, 8 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 DownloadControllerAndroidImpl::DownloadInfoAndroid::DownloadInfoAndroid( 319 DownloadControllerAndroidImpl::DownloadInfoAndroid::DownloadInfoAndroid(
320 net::URLRequest* request) { 320 net::URLRequest* request) {
321 request->GetResponseHeaderByName("content-disposition", &content_disposition); 321 request->GetResponseHeaderByName("content-disposition", &content_disposition);
322 322
323 if (request->response_headers()) 323 if (request->response_headers())
324 request->response_headers()->GetMimeType(&original_mime_type); 324 request->response_headers()->GetMimeType(&original_mime_type);
325 325
326 request->extra_request_headers().GetHeader( 326 request->extra_request_headers().GetHeader(
327 net::HttpRequestHeaders::kUserAgent, &user_agent); 327 net::HttpRequestHeaders::kUserAgent, &user_agent);
328 GURL referer_url(request->GetSanitizedReferrer()); 328 GURL referer_url(request->referrer());
329 if (referer_url.is_valid()) 329 if (referer_url.is_valid())
330 referer = referer_url.spec(); 330 referer = referer_url.spec();
331 if (!request->url_chain().empty()) { 331 if (!request->url_chain().empty()) {
332 original_url = request->url_chain().front(); 332 original_url = request->url_chain().front();
333 url = request->url_chain().back(); 333 url = request->url_chain().back();
334 } 334 }
335 } 335 }
336 336
337 DownloadControllerAndroidImpl::DownloadInfoAndroid::~DownloadInfoAndroid() {} 337 DownloadControllerAndroidImpl::DownloadInfoAndroid::~DownloadInfoAndroid() {}
338 338
339 } // namespace content 339 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu_browsertest.cc ('k') | content/browser/download/download_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698