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

Side by Side Diff: net/url_request/url_fetcher_core.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
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | net/url_request/url_request.h » ('j') | 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 "net/url_request/url_fetcher_core.h" 5 #include "net/url_request/url_fetcher_core.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 request_.reset(request_context_getter_->GetURLRequestContext()->CreateRequest( 526 request_.reset(request_context_getter_->GetURLRequestContext()->CreateRequest(
527 original_url_, this)); 527 original_url_, this));
528 request_->set_stack_trace(stack_trace_); 528 request_->set_stack_trace(stack_trace_);
529 int flags = request_->load_flags() | load_flags_; 529 int flags = request_->load_flags() | load_flags_;
530 if (!g_interception_enabled) 530 if (!g_interception_enabled)
531 flags = flags | LOAD_DISABLE_INTERCEPT; 531 flags = flags | LOAD_DISABLE_INTERCEPT;
532 532
533 if (is_chunked_upload_) 533 if (is_chunked_upload_)
534 request_->EnableChunkedUpload(); 534 request_->EnableChunkedUpload();
535 request_->set_load_flags(flags); 535 request_->set_load_flags(flags);
536 request_->set_referrer(referrer_); 536 request_->SetReferrer(referrer_);
537 request_->set_first_party_for_cookies(first_party_for_cookies_.is_empty() ? 537 request_->set_first_party_for_cookies(first_party_for_cookies_.is_empty() ?
538 original_url_ : first_party_for_cookies_); 538 original_url_ : first_party_for_cookies_);
539 if (url_request_data_key_ && !url_request_create_data_callback_.is_null()) { 539 if (url_request_data_key_ && !url_request_create_data_callback_.is_null()) {
540 request_->SetUserData(url_request_data_key_, 540 request_->SetUserData(url_request_data_key_,
541 url_request_create_data_callback_.Run()); 541 url_request_create_data_callback_.Run());
542 } 542 }
543 543
544 switch (request_type_) { 544 switch (request_type_) {
545 case URLFetcher::GET: 545 case URLFetcher::GET:
546 break; 546 break;
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 } 900 }
901 901
902 void URLFetcherCore::InformDelegateDownloadDataInDelegateThread( 902 void URLFetcherCore::InformDelegateDownloadDataInDelegateThread(
903 scoped_ptr<std::string> download_data) { 903 scoped_ptr<std::string> download_data) {
904 DCHECK(delegate_task_runner_->BelongsToCurrentThread()); 904 DCHECK(delegate_task_runner_->BelongsToCurrentThread());
905 if (delegate_) 905 if (delegate_)
906 delegate_->OnURLFetchDownloadData(fetcher_, download_data.Pass()); 906 delegate_->OnURLFetchDownloadData(fetcher_, download_data.Pass());
907 } 907 }
908 908
909 } // namespace net 909 } // namespace net
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | net/url_request/url_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698