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

Unified Diff: chrome/browser/extensions/settings_api_bubble_controller.cc

Issue 1081113002: Revert of [Extensions] Make extension message bubble factory platform-abstract (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/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 e90cf936acd09c2c5ba26e269dabe57a4f5e464b..e89f42f129033152457ea5d93a2587c2347aeaa3 100644
--- a/chrome/browser/extensions/settings_api_bubble_controller.cc
+++ b/chrome/browser/extensions/settings_api_bubble_controller.cc
@@ -54,7 +54,6 @@
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;
@@ -245,10 +244,6 @@
return false;
}
-bool SettingsApiBubbleDelegate::ShouldHighlightExtensions() const {
- return type_ == BUBBLE_TYPE_STARTUP_PAGES;
-}
-
void SettingsApiBubbleDelegate::LogExtensionCount(size_t count) {
}
@@ -295,27 +290,11 @@
SettingsApiBubbleController::~SettingsApiBubbleController() {}
-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)
+bool SettingsApiBubbleController::ShouldShow(const std::string& extension_id) {
+ if (delegate()->HasBubbleInfoBeenAcknowledged(extension_id))
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

Powered by Google App Engine
This is Rietveld 408576698