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

Unified Diff: content/browser/tab_contents/navigation_controller.cc

Issue 8785004: Change NavigationController::LoadURL to take a Referrer class instead of a GURL as referrer (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 side-by-side diff with in-line comments
Download patch
Index: content/browser/tab_contents/navigation_controller.cc
diff --git a/content/browser/tab_contents/navigation_controller.cc b/content/browser/tab_contents/navigation_controller.cc
index 852b87f7905323860c89b754a4b1aa8d97627187..960d9fc441d3abacc6c4250c14455e1362273b3e 100644
--- a/content/browser/tab_contents/navigation_controller.cc
+++ b/content/browser/tab_contents/navigation_controller.cc
@@ -472,7 +472,8 @@ void NavigationController::RemoveEntryAtIndex(int index,
} else {
// If there is nothing to show, show a default page.
LoadURL(default_url.is_empty() ? GURL("about:blank") : default_url,
- GURL(), content::PAGE_TRANSITION_START_PAGE, std::string());
+ content::Referrer(), content::PAGE_TRANSITION_START_PAGE,
+ std::string());
}
}
}
@@ -518,13 +519,13 @@ void NavigationController::TransferURL(
void NavigationController::LoadURL(
const GURL& url,
- const GURL& referrer,
+ const content::Referrer& referrer,
content::PageTransition transition,
const std::string& extra_headers) {
// The user initiated a load, we don't need to reload anymore.
needs_reload_ = false;
- NavigationEntry* entry = CreateNavigationEntry(url, referrer, transition,
+ NavigationEntry* entry = CreateNavigationEntry(url, referrer.url, transition,
false,
extra_headers,
browser_context_);
@@ -534,13 +535,13 @@ void NavigationController::LoadURL(
void NavigationController::LoadURLFromRenderer(
const GURL& url,
- const GURL& referrer,
+ const content::Referrer& referrer,
content::PageTransition transition,
const std::string& extra_headers) {
// The user initiated a load, we don't need to reload anymore.
needs_reload_ = false;
- NavigationEntry* entry = CreateNavigationEntry(url, referrer, transition,
+ NavigationEntry* entry = CreateNavigationEntry(url, referrer.url, transition,
true,
extra_headers,
browser_context_);
« no previous file with comments | « content/browser/tab_contents/navigation_controller.h ('k') | content/browser/tab_contents/navigation_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698