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

Side by Side Diff: content/browser/tab_contents/navigation_controller.cc

Issue 8774050: Pass along the referrer policy (renderer side) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/tab_contents/navigation_controller.h" 5 #include "content/browser/tab_contents/navigation_controller.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_number_conversions.h" // Temporary 9 #include "base/string_number_conversions.h" // Temporary
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 // When navigating to a new page, give the browser URL handler a chance to 776 // When navigating to a new page, give the browser URL handler a chance to
777 // update the virtual URL based on the new URL. For example, this is needed 777 // update the virtual URL based on the new URL. For example, this is needed
778 // to show chrome://bookmarks/#1 when the bookmarks webui extension changes 778 // to show chrome://bookmarks/#1 when the bookmarks webui extension changes
779 // the URL. 779 // the URL.
780 update_virtual_url = true; 780 update_virtual_url = true;
781 } 781 }
782 782
783 new_entry->set_url(params.url); 783 new_entry->set_url(params.url);
784 if (update_virtual_url) 784 if (update_virtual_url)
785 UpdateVirtualURLToURL(new_entry, params.url); 785 UpdateVirtualURLToURL(new_entry, params.url);
786 new_entry->set_referrer(params.referrer); 786 new_entry->set_referrer(params.referrer.url);
787 new_entry->set_page_id(params.page_id); 787 new_entry->set_page_id(params.page_id);
788 new_entry->set_transition_type(params.transition); 788 new_entry->set_transition_type(params.transition);
789 new_entry->set_site_instance(tab_contents_->GetSiteInstance()); 789 new_entry->set_site_instance(tab_contents_->GetSiteInstance());
790 new_entry->set_has_post_data(params.is_post); 790 new_entry->set_has_post_data(params.is_post);
791 791
792 InsertOrReplaceEntry(new_entry, *did_replace_entry); 792 InsertOrReplaceEntry(new_entry, *did_replace_entry);
793 } 793 }
794 794
795 void NavigationController::RendererDidNavigateToExistingPage( 795 void NavigationController::RendererDidNavigateToExistingPage(
796 const ViewHostMsg_FrameNavigate_Params& params) { 796 const ViewHostMsg_FrameNavigate_Params& params) {
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 for (int i = 0; i < max_index; i++) { 1262 for (int i = 0; i < max_index; i++) {
1263 // When cloning a tab, copy all entries except interstitial pages 1263 // When cloning a tab, copy all entries except interstitial pages
1264 if (source.entries_[i].get()->page_type() != 1264 if (source.entries_[i].get()->page_type() !=
1265 content::PAGE_TYPE_INTERSTITIAL) { 1265 content::PAGE_TYPE_INTERSTITIAL) {
1266 entries_.insert(entries_.begin() + insert_index++, 1266 entries_.insert(entries_.begin() + insert_index++,
1267 linked_ptr<NavigationEntry>( 1267 linked_ptr<NavigationEntry>(
1268 new NavigationEntry(*source.entries_[i]))); 1268 new NavigationEntry(*source.entries_[i])));
1269 } 1269 }
1270 } 1270 }
1271 } 1271 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698