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

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 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 // When navigating to a new page, give the browser URL handler a chance to 795 // When navigating to a new page, give the browser URL handler a chance to
796 // update the virtual URL based on the new URL. For example, this is needed 796 // update the virtual URL based on the new URL. For example, this is needed
797 // to show chrome://bookmarks/#1 when the bookmarks webui extension changes 797 // to show chrome://bookmarks/#1 when the bookmarks webui extension changes
798 // the URL. 798 // the URL.
799 update_virtual_url = true; 799 update_virtual_url = true;
800 } 800 }
801 801
802 new_entry->set_url(params.url); 802 new_entry->set_url(params.url);
803 if (update_virtual_url) 803 if (update_virtual_url)
804 UpdateVirtualURLToURL(new_entry, params.url); 804 UpdateVirtualURLToURL(new_entry, params.url);
805 new_entry->set_referrer(params.referrer); 805 new_entry->set_referrer(params.referrer.url);
806 new_entry->set_page_id(params.page_id); 806 new_entry->set_page_id(params.page_id);
807 new_entry->set_transition_type(params.transition); 807 new_entry->set_transition_type(params.transition);
808 new_entry->set_site_instance(tab_contents_->GetSiteInstance()); 808 new_entry->set_site_instance(tab_contents_->GetSiteInstance());
809 new_entry->set_has_post_data(params.is_post); 809 new_entry->set_has_post_data(params.is_post);
810 810
811 InsertOrReplaceEntry(new_entry, *did_replace_entry); 811 InsertOrReplaceEntry(new_entry, *did_replace_entry);
812 } 812 }
813 813
814 void NavigationController::RendererDidNavigateToExistingPage( 814 void NavigationController::RendererDidNavigateToExistingPage(
815 const ViewHostMsg_FrameNavigate_Params& params) { 815 const ViewHostMsg_FrameNavigate_Params& params) {
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
1281 for (int i = 0; i < max_index; i++) { 1281 for (int i = 0; i < max_index; i++) {
1282 // When cloning a tab, copy all entries except interstitial pages 1282 // When cloning a tab, copy all entries except interstitial pages
1283 if (source.entries_[i].get()->page_type() != 1283 if (source.entries_[i].get()->page_type() !=
1284 content::PAGE_TYPE_INTERSTITIAL) { 1284 content::PAGE_TYPE_INTERSTITIAL) {
1285 entries_.insert(entries_.begin() + insert_index++, 1285 entries_.insert(entries_.begin() + insert_index++,
1286 linked_ptr<NavigationEntry>( 1286 linked_ptr<NavigationEntry>(
1287 new NavigationEntry(*source.entries_[i]))); 1287 new NavigationEntry(*source.entries_[i])));
1288 } 1288 }
1289 } 1289 }
1290 } 1290 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/test_render_view_host.cc ('k') | content/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698