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

Unified Diff: content/browser/tab_contents/navigation_entry.h

Issue 8224023: Don't show URL for pending new navigations initiated by the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflicts. Created 9 years, 2 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/tab_contents/navigation_entry.h
diff --git a/content/browser/tab_contents/navigation_entry.h b/content/browser/tab_contents/navigation_entry.h
index d07c28fbe73df61a74a1974ee52b234b7ea6aed9..c0b4df6f23735dd7ae8fe52f6138d4ea32dfbb79 100644
--- a/content/browser/tab_contents/navigation_entry.h
+++ b/content/browser/tab_contents/navigation_entry.h
@@ -186,7 +186,8 @@ class CONTENT_EXPORT NavigationEntry {
const GURL& url,
const GURL& referrer,
const string16& title,
- content::PageTransition transition_type);
+ content::PageTransition transition_type,
+ bool is_renderer_initiated);
~NavigationEntry();
// Page-related stuff --------------------------------------------------------
@@ -351,6 +352,15 @@ class CONTENT_EXPORT NavigationEntry {
return transition_type_;
}
+ // Whether this (pending) navigation is renderer-initiated. Resets to false
+ // for all types of navigations after commit.
+ void set_is_renderer_initiated(bool is_renderer_initiated) {
+ is_renderer_initiated_ = is_renderer_initiated;
+ }
+ bool is_renderer_initiated() const {
+ return is_renderer_initiated_;
+ }
+
// The user typed URL was the URL that the user initiated the navigation
// with, regardless of any redirects. This is used to generate keywords, for
// example, based on "what the user thinks the site is called" rather than
@@ -430,6 +440,11 @@ class CONTENT_EXPORT NavigationEntry {
// This member is not persisted with sesssion restore.
std::string extra_headers_;
+ // Whether the entry, while loading, was created for a renderer-initiated
+ // navigation. This dictates whether the URL should be displayed before the
+ // navigation commits. It is cleared on commit and not persisted.
+ bool is_renderer_initiated_;
+
// This is a cached version of the result of GetTitleForDisplay. It prevents
// us from having to do URL formatting on the URL every time the title is
// displayed. When the URL, virtual URL, or title is set, this should be
« no previous file with comments | « content/browser/tab_contents/navigation_controller_unittest.cc ('k') | content/browser/tab_contents/navigation_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698