Chromium Code Reviews| Index: chrome/browser/extensions/extension_context_menu_api.cc |
| =================================================================== |
| --- chrome/browser/extensions/extension_context_menu_api.cc (revision 114114) |
| +++ chrome/browser/extensions/extension_context_menu_api.cc (working copy) |
| @@ -265,6 +265,8 @@ |
| if (!success) |
| return false; |
| + menu_manager->SanitizeRadioButtons(); |
| + |
| return true; |
| } |
| @@ -332,6 +334,8 @@ |
| if (!SetURLPatterns(*properties, item)) |
| return false; |
| + menu_manager->SanitizeRadioButtons(); |
| + |
| return true; |
| } |
| @@ -349,7 +353,12 @@ |
| return false; |
| } |
| - return manager->RemoveContextMenuItem(id); |
| + if (manager->RemoveContextMenuItem(id)) { |
|
Aaron Boodman
2011/12/15 00:43:21
We usually prefer the opposite pattern:
if (!some
|
| + manager->SanitizeRadioButtons(); |
| + return true; |
| + } |
| + |
| + return false; |
| } |
| bool RemoveAllContextMenusFunction::RunImpl() { |