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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 540483002: Fix regression in showing bookmark star when an extension should override it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index c1e37ef14d4be0268f403cd365368bde687b95f5..f3b8949c9665cd9f1c7e45e0ca9b5e075a420027 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -981,13 +981,8 @@ void LocationBarView::Update(const WebContents* contents) {
GetToolbarModel()->input_in_progress() ? NULL : GetWebContents();
open_pdf_in_reader_view_->Update(web_contents_for_sub_views);
- if (star_view_) {
- star_view_->SetVisible(
- browser_defaults::bookmarks_enabled && !is_popup_mode_ &&
- !GetToolbarModel()->input_in_progress() &&
- edit_bookmarks_enabled_.GetValue() &&
- !IsBookmarkStarHiddenByExtension());
- }
+ if (star_view_)
+ UpdateBookmarkStarVisibility();
if (contents)
omnibox_view_->OnTabChanged(contents);
@@ -1300,6 +1295,16 @@ void LocationBarView::InvalidatePageActions() {
DeletePageActionViews();
}
+void LocationBarView::UpdateBookmarkStarVisibility() {
+ if (star_view_) {
+ star_view_->SetVisible(
+ browser_defaults::bookmarks_enabled && !is_popup_mode_ &&
+ !GetToolbarModel()->input_in_progress() &&
+ edit_bookmarks_enabled_.GetValue() &&
+ !IsBookmarkStarHiddenByExtension());
+ }
+}
+
bool LocationBarView::ShowPageActionPopup(
const extensions::Extension* extension,
bool grant_tab_permissions) {
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/test/base/test_browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698