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

Unified Diff: chrome/browser/extensions/extension_ui_util.cc

Issue 1028503002: Don't show location bar in bookmark apps if there has been no navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_ui_util.cc
diff --git a/chrome/browser/extensions/extension_ui_util.cc b/chrome/browser/extensions/extension_ui_util.cc
index fe1915594e13afcbe74ebaa52b2bb6329f011f5a..818b4acd7df3b51f01c2f23e46753fca13b62d2f 100644
--- a/chrome/browser/extensions/extension_ui_util.cc
+++ b/chrome/browser/extensions/extension_ui_util.cc
@@ -79,6 +79,10 @@ bool ShouldShowLocationBar(const Extension* extension,
if (!extension->from_bookmark())
return false;
+ // Don't show a location bar until a navigation has occurred.
+ if (web_contents->GetLastCommittedURL().is_empty())
felt 2015/03/23 20:41:56 Can you test what happens here if you navigate to
benwells 2015/03/24 05:14:59 I've put a screenshot on the bug. Let me know if t
felt 2015/03/24 05:27:25 Thanks, yes, that's what I meant. I wanted to chec
+ return false;
+
GURL launch_url = AppLaunchInfo::GetLaunchWebURL(extension);
return !(IsSameOriginOrMoreSecure(launch_url,
web_contents->GetVisibleURL()) &&
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698