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

Unified Diff: chrome/browser/ui/extensions/extension_message_bubble_factory.h

Issue 1275623004: [Extensions] Expand testing overrides for extension warning bubbles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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/ui/extensions/extension_message_bubble_factory.h
diff --git a/chrome/browser/ui/extensions/extension_message_bubble_factory.h b/chrome/browser/ui/extensions/extension_message_bubble_factory.h
index 494f7218e121e4a655336cc8defa2714fdeb06bd..af724e2b87247bf38e3a7150c83d8740161afe1f 100644
--- a/chrome/browser/ui/extensions/extension_message_bubble_factory.h
+++ b/chrome/browser/ui/extensions/extension_message_bubble_factory.h
@@ -19,14 +19,21 @@ class ExtensionMessageBubbleController;
// running in developer mode that we want to warn the user about.
class ExtensionMessageBubbleFactory {
public:
+ // An enum to allow us to override the default behavior for testing.
+ enum OverrideForTesting {
+ NO_OVERRIDE,
+ OVERRIDE_ENABLED,
+ OVERRIDE_DISABLED,
+ };
+
explicit ExtensionMessageBubbleFactory(Browser* browser);
~ExtensionMessageBubbleFactory();
// Returns the controller for the bubble that should be shown, if any.
scoped_ptr<extensions::ExtensionMessageBubbleController> GetController();
- // Enables the bubbles across all platforms for testing.
- static void set_enabled_for_tests(bool enabled);
+ // Overrides the default behavior for testing.
+ static void set_override_for_tests(OverrideForTesting override);
private:
Browser* browser_;

Powered by Google App Engine
This is Rietveld 408576698