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

Unified Diff: content/browser/web_contents/navigation_controller_impl.h

Issue 21544005: Take the navigation type into account when checking if the navigation is in page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More generic and brave fix Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/navigation_controller_impl.h
diff --git a/content/browser/web_contents/navigation_controller_impl.h b/content/browser/web_contents/navigation_controller_impl.h
index c95ef4568ca997f2fd23875595811b16ed578e65..bc444d87fe3c6bc7dbd84d26e44eb616690be1ee 100644
--- a/content/browser/web_contents/navigation_controller_impl.h
+++ b/content/browser/web_contents/navigation_controller_impl.h
@@ -154,8 +154,9 @@ class CONTENT_EXPORT NavigationControllerImpl
// whether a navigation happened without loading anything, the same URL could
// be a reload, while only a different ref would be in-page (pages can't clear
// refs without reload, only change to "#" which we don't count as empty).
- bool IsURLInPageNavigation(const GURL& url) const {
- return IsURLInPageNavigation(url, false);
+ bool IsURLInPageNavigation(const GURL& url,
+ content::NavigationType navigation_type) const {
Charlie Reis 2013/08/06 18:48:08 We can leave this as a one-argument function that
+ return IsURLInPageNavigation(url, false, navigation_type);
}
// The situation is made murkier by history.replaceState(), which could
@@ -163,7 +164,8 @@ class CONTENT_EXPORT NavigationControllerImpl
// we need this form which lets the (untrustworthy) renderer resolve the
// ambiguity, but only when the URLs are equal. This should be safe since the
// origin isn't changing.
- bool IsURLInPageNavigation(const GURL& url, bool renderer_says_in_page) const;
+ bool IsURLInPageNavigation(const GURL& url, bool renderer_says_in_page,
+ content::NavigationType navigation_type) const;
Charlie Reis 2013/08/06 18:48:08 Style nit: if all arguments can't fit on the same
// Sets the SessionStorageNamespace for the given |partition_id|. This is
// used during initialization of a new NavigationController to allow

Powered by Google App Engine
This is Rietveld 408576698