Index: chrome/browser/extensions/settings_api_bubble_controller.cc |
diff --git a/chrome/browser/extensions/settings_api_bubble_controller.cc b/chrome/browser/extensions/settings_api_bubble_controller.cc |
index e89f42f129033152457ea5d93a2587c2347aeaa3..e90cf936acd09c2c5ba26e269dabe57a4f5e464b 100644 |
--- a/chrome/browser/extensions/settings_api_bubble_controller.cc |
+++ b/chrome/browser/extensions/settings_api_bubble_controller.cc |
@@ -54,6 +54,7 @@ class SettingsApiBubbleDelegate |
base::string16 GetActionButtonLabel() const override; |
base::string16 GetDismissButtonLabel() const override; |
bool ShouldShowExtensionList() const override; |
+ bool ShouldHighlightExtensions() const override; |
void LogExtensionCount(size_t count) override; |
void LogAction( |
ExtensionMessageBubbleController::BubbleAction action) override; |
@@ -244,6 +245,10 @@ bool SettingsApiBubbleDelegate::ShouldShowExtensionList() const { |
return false; |
} |
+bool SettingsApiBubbleDelegate::ShouldHighlightExtensions() const { |
+ return type_ == BUBBLE_TYPE_STARTUP_PAGES; |
+} |
+ |
void SettingsApiBubbleDelegate::LogExtensionCount(size_t count) { |
} |
@@ -290,11 +295,27 @@ SettingsApiBubbleController::SettingsApiBubbleController( |
SettingsApiBubbleController::~SettingsApiBubbleController() {} |
-bool SettingsApiBubbleController::ShouldShow(const std::string& extension_id) { |
- if (delegate()->HasBubbleInfoBeenAcknowledged(extension_id)) |
+bool SettingsApiBubbleController::ShouldShow() { |
+ const Extension* extension = nullptr; |
+ switch (type_) { |
+ case BUBBLE_TYPE_HOME_PAGE: |
+ extension = GetExtensionOverridingHomepage(profile_); |
+ break; |
+ case BUBBLE_TYPE_SEARCH_ENGINE: |
+ extension = GetExtensionOverridingSearchEngine(profile_); |
+ break; |
+ case BUBBLE_TYPE_STARTUP_PAGES: |
+ extension = GetExtensionOverridingStartupPages(profile_); |
+ break; |
+ } |
+ |
+ if (!extension) |
+ return false; |
+ |
+ if (delegate()->HasBubbleInfoBeenAcknowledged(extension->id())) |
return false; |
- if (!delegate()->ShouldIncludeExtension(extension_id)) |
+ if (!delegate()->ShouldIncludeExtension(extension->id())) |
return false; |
// If the browser is showing the 'Chrome crashed' infobar, it won't be showing |