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

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: address code review comments 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 "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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 request_.reset(request_context_getter_->GetURLRequestContext()->CreateRequest( 528 request_.reset(request_context_getter_->GetURLRequestContext()->CreateRequest(
529 original_url_, this)); 529 original_url_, this));
530 request_->set_stack_trace(stack_trace_); 530 request_->set_stack_trace(stack_trace_);
531 int flags = request_->load_flags() | load_flags_; 531 int flags = request_->load_flags() | load_flags_;
532 if (!g_interception_enabled) 532 if (!g_interception_enabled)
533 flags = flags | LOAD_DISABLE_INTERCEPT; 533 flags = flags | LOAD_DISABLE_INTERCEPT;
534 534
535 if (is_chunked_upload_) 535 if (is_chunked_upload_)
536 request_->EnableChunkedUpload(); 536 request_->EnableChunkedUpload();
537 request_->set_load_flags(flags); 537 request_->set_load_flags(flags);
538 request_->set_referrer(referrer_); 538 request_->SetReferrer(referrer_);
539 request_->set_first_party_for_cookies(first_party_for_cookies_.is_empty() ? 539 request_->set_first_party_for_cookies(first_party_for_cookies_.is_empty() ?
540 original_url_ : first_party_for_cookies_); 540 original_url_ : first_party_for_cookies_);
541 if (url_request_data_key_ && !url_request_create_data_callback_.is_null()) { 541 if (url_request_data_key_ && !url_request_create_data_callback_.is_null()) {
542 request_->SetUserData(url_request_data_key_, 542 request_->SetUserData(url_request_data_key_,
543 url_request_create_data_callback_.Run()); 543 url_request_create_data_callback_.Run());
544 } 544 }
545 545
546 switch (request_type_) { 546 switch (request_type_) {
547 case URLFetcher::GET: 547 case URLFetcher::GET:
548 break; 548 break;
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 } 902 }
903 903
904 void URLFetcherCore::InformDelegateDownloadDataInDelegateThread( 904 void URLFetcherCore::InformDelegateDownloadDataInDelegateThread(
905 scoped_ptr<std::string> download_data) { 905 scoped_ptr<std::string> download_data) {
906 DCHECK(delegate_task_runner_->BelongsToCurrentThread()); 906 DCHECK(delegate_task_runner_->BelongsToCurrentThread());
907 if (delegate_) 907 if (delegate_)
908 delegate_->OnURLFetchDownloadData(fetcher_, download_data.Pass()); 908 delegate_->OnURLFetchDownloadData(fetcher_, download_data.Pass());
909 } 909 }
910 910
911 } // namespace net 911 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698