summaryrefslogtreecommitdiffstats
path: root/content/public
diff options
context:
space:
mode:
authorcreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-21 19:41:30 +0000
committercreis@chromium.org <creis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-21 19:41:30 +0000
commite2eb8af4c96ce74c1ce1773fd2d94b1f16effe36 (patch)
tree5a951ccdcb5795103ec1cd0905f230e9ef7d26bb /content/public
parenta4846a0b4dc924078a0562fcb5c851a682fd5df3 (diff)
downloadchromium_src-e2eb8af4c96ce74c1ce1773fd2d94b1f16effe36.zip
chromium_src-e2eb8af4c96ce74c1ce1773fd2d94b1f16effe36.tar.gz
chromium_src-e2eb8af4c96ce74c1ce1773fd2d94b1f16effe36.tar.bz2
Don't leave aborted URLs in the omnibox unless we're on the NTP.
BUG=355537 TEST=See bug for repro steps. Review URL: https://codereview.chromium.org/232463007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265044 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/public')
-rw-r--r--content/public/browser/web_contents_delegate.cc4
-rw-r--r--content/public/browser/web_contents_delegate.h5
2 files changed, 9 insertions, 0 deletions
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index 22430da..5346c2a 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -37,6 +37,10 @@ bool WebContentsDelegate::ShouldSuppressDialogs() {
return false;
}
+bool WebContentsDelegate::ShouldPreserveAbortedURLs(WebContents* source) {
+ return false;
+}
+
bool WebContentsDelegate::AddMessageToConsole(WebContents* source,
int32 level,
const base::string16& message,
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 0210314..d22d7c7 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -173,6 +173,11 @@ class CONTENT_EXPORT WebContentsDelegate {
// Default is false.
virtual bool ShouldSuppressDialogs();
+ // Returns whether pending NavigationEntries for aborted browser-initiated
+ // navigations should be preserved (and thus returned from GetVisibleURL).
+ // Defaults to false.
+ virtual bool ShouldPreserveAbortedURLs(WebContents* source);
+
// Add a message to the console. Returning true indicates that the delegate
// handled the message. If false is returned the default logging mechanism
// will be used for the message.