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

Unified Diff: chrome/browser/cocoa/location_bar/location_bar_view_mac.h

Issue 3176021: Ensure that a browser action is never passed to a function which expects a page action. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Better fix: don't pass a browser action into a function expecting a page action. Created 10 years, 4 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/cocoa/location_bar/location_bar_view_mac.h
diff --git a/chrome/browser/cocoa/location_bar/location_bar_view_mac.h b/chrome/browser/cocoa/location_bar/location_bar_view_mac.h
index d32bc7abfe22889b95eb2af043fda1d1ebe210bf..6a7a59863af33b0c587e7bf7e2dc26b331a24639 100644
--- a/chrome/browser/cocoa/location_bar/location_bar_view_mac.h
+++ b/chrome/browser/cocoa/location_bar/location_bar_view_mac.h
@@ -110,7 +110,9 @@ class LocationBarViewMac : public AutocompleteEditController,
bool preview_enabled);
// Return |page_action|'s info-bubble point in window coordinates.
- // Returns |NSZeroPoint| if |page_action| is not present.
+ // This function should always be called with a visible page action.
+ // If |page_action| is not a page action or not visible, NOTREACHED()
+ // is called and this function returns |NSZeroPoint|.
NSPoint GetPageActionBubblePoint(ExtensionAction* page_action);
// Get the blocked-popup content setting's frame in window

Powered by Google App Engine
This is Rietveld 408576698