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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm

Issue 287543002: Remove origin chip v1 and "hide on input" v2 behavior. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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: chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
index 54476d19d598aa949f17670afa8f81d0414a43bd..53b6724924996e7ca8fb0a8a480b37f33b356619 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
@@ -105,21 +105,17 @@ bool LocationIconDecoration::OnMousePressed(NSRect frame, NSPoint location) {
// bar, or the location bar is at the NTP. However, if the origin chip is
// enabled, the omnibox will be empty by default, so the page info should be
// shown in those cases as well.
- if ((chrome::ShouldDisplayOriginChipV2() &&
- owner_->GetOmniboxView()->model() &&
- owner_->GetOmniboxView()->model()->user_input_in_progress()) ||
- (!chrome::ShouldDisplayOriginChipV2() &&
- owner_->GetOmniboxView()->IsEditingOrEmpty()))
+ if (chrome::ShouldDisplayOriginChip() ?
+ (owner_->GetOmniboxView()->model() &&
+ owner_->GetOmniboxView()->model()->user_input_in_progress()) :
+ owner_->GetOmniboxView()->IsEditingOrEmpty())
return true;
WebContents* tab = owner_->GetWebContents();
const NavigationController& controller = tab->GetController();
// Important to use GetVisibleEntry to match what's showing in the omnibox.
NavigationEntry* nav_entry = controller.GetVisibleEntry();
- if (!nav_entry) {
- NOTREACHED();
- return true;
- }
+ DCHECK(nav_entry);
Browser* browser = chrome::FindBrowserWithWebContents(tab);
chrome::ShowWebsiteSettings(browser, tab, nav_entry->GetURL(),
nav_entry->GetSSL());
« no previous file with comments | « chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm ('k') | chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698