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

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

Issue 819623003: Add more checks to ShowPageActionPopup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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/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 9be31772fe3b03f571e1213f59b86495cf007f51..90e4b162575a3b2a6741cbf16175086a9355b144 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -1315,7 +1315,12 @@ bool LocationBarView::ShowPageActionPopup(
CHECK(extension_action);
PageActionWithBadgeView* page_action_view =
GetPageActionView(extension_action);
- CHECK(page_action_view);
+ if (!page_action_view) {
+ CHECK(GetWebContents());
Mike Wittman 2014/12/19 19:13:36 It would be better to check here that WebContents
danduong 2014/12/19 19:15:08 I'll probably add both checks.
+ CHECK(!is_popup_mode_);
+ CHECK(!extensions::FeatureSwitch::extension_action_redesign()->IsEnabled());
+ CHECK(false);
+ }
PageActionImageView* page_action_image_view = page_action_view->image_view();
CHECK(page_action_image_view);
ExtensionActionViewController* extension_action_view_controller =
« 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