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

Unified Diff: chrome/browser/ui/extensions/extension_installed_bubble.cc

Issue 1779343002: [Extensions] Update installed bubble for extensions with synthesized actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 9 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 | « no previous file | chrome/browser/ui/extensions/extension_installed_bubble_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/extensions/extension_installed_bubble.cc
diff --git a/chrome/browser/ui/extensions/extension_installed_bubble.cc b/chrome/browser/ui/extensions/extension_installed_bubble.cc
index 2db22acb480bf44ee01312e5a21f82b1e6808fa8..9813606daf691408a8c202e4d711d84392487cfb 100644
--- a/chrome/browser/ui/extensions/extension_installed_bubble.cc
+++ b/chrome/browser/ui/extensions/extension_installed_bubble.cc
@@ -250,9 +250,12 @@ void ExtensionInstalledBubble::Initialize() {
bool extension_action_redesign_on =
extensions::FeatureSwitch::extension_action_redesign()->IsEnabled();
- if (extensions::ActionInfo::GetBrowserActionInfo(extension_)) {
+ const extensions::ActionInfo* action_info = nullptr;
+ if ((action_info = extensions::ActionInfo::GetBrowserActionInfo(
+ extension_)) != nullptr) {
type_ = BROWSER_ACTION;
- } else if (extensions::ActionInfo::GetPageActionInfo(extension_) &&
+ } else if ((action_info = extensions::ActionInfo::GetPageActionInfo(
+ extension_)) != nullptr &&
(extensions::ActionInfo::IsVerboseInstallMessage(extension_) ||
extension_action_redesign_on)) {
type_ = PAGE_ACTION;
@@ -271,7 +274,10 @@ void ExtensionInstalledBubble::Initialize() {
switch (type_) {
case BROWSER_ACTION:
case PAGE_ACTION:
- options_ |= HOW_TO_USE;
+ DCHECK(action_info);
+ if (!action_info->synthesized)
+ options_ |= HOW_TO_USE;
+
if (has_command_keybinding()) {
options_ |= SHOW_KEYBINDING;
} else {
« no previous file with comments | « no previous file | chrome/browser/ui/extensions/extension_installed_bubble_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698