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

Side by Side Diff: content/browser/loader/resource_loader.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/loader/resource_loader.h" 5 #include "content/browser/loader/resource_loader.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/time.h" 9 #include "base/time.h"
10 #include "content/browser/child_process_security_policy_impl.h" 10 #include "content/browser/child_process_security_policy_impl.h"
(...skipping 511 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 // if the browser_context parameter is NULL. This does not work for hosted 522 // if the browser_context parameter is NULL. This does not work for hosted
523 // apps, but should be fine for prototyping. 523 // apps, but should be fine for prototyping.
524 // TODO(nasko): Once the SiteInstance check is fixed, ensure we do the 524 // TODO(nasko): Once the SiteInstance check is fixed, ensure we do the
525 // right thing here. http://crbug.com/160576 525 // right thing here. http://crbug.com/160576
526 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 526 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
527 if (command_line.HasSwitch(switches::kSitePerProcess) && 527 if (command_line.HasSwitch(switches::kSitePerProcess) &&
528 GetRequestInfo()->GetResourceType() == ResourceType::SUB_FRAME && 528 GetRequestInfo()->GetResourceType() == ResourceType::SUB_FRAME &&
529 response->head.mime_type == "text/html" && 529 response->head.mime_type == "text/html" &&
530 !request_->url().SchemeIs(chrome::kChromeUIScheme) && 530 !request_->url().SchemeIs(chrome::kChromeUIScheme) &&
531 !SiteInstance::IsSameWebSite(NULL, request_->url(), 531 !SiteInstance::IsSameWebSite(NULL, request_->url(),
532 request_->GetSanitizedReferrer())) { 532 GURL(request_->referrer()))) {
533 response->head.mime_type = "application/browser-plugin"; 533 response->head.mime_type = "application/browser-plugin";
534 } 534 }
535 535
536 if (request_->ssl_info().cert) { 536 if (request_->ssl_info().cert) {
537 int cert_id = 537 int cert_id =
538 CertStore::GetInstance()->StoreCert(request_->ssl_info().cert, 538 CertStore::GetInstance()->StoreCert(request_->ssl_info().cert,
539 info->GetChildID()); 539 info->GetChildID());
540 response->head.security_info = SerializeSecurityInfo( 540 response->head.security_info = SerializeSecurityInfo(
541 cert_id, 541 cert_id,
542 request_->ssl_info().cert_status, 542 request_->ssl_info().cert_status,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 // we resume. 647 // we resume.
648 deferred_stage_ = DEFERRED_FINISH; 648 deferred_stage_ = DEFERRED_FINISH;
649 } 649 }
650 } 650 }
651 651
652 void ResourceLoader::CallDidFinishLoading() { 652 void ResourceLoader::CallDidFinishLoading() {
653 delegate_->DidFinishLoading(this); 653 delegate_->DidFinishLoading(this);
654 } 654 }
655 655
656 } // namespace content 656 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/resource_dispatcher_host_unittest.cc ('k') | content/browser/renderer_host/render_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698