| Index: chrome/browser/extensions/extension_message_bubble_controller.h
|
| diff --git a/chrome/browser/extensions/extension_message_bubble_controller.h b/chrome/browser/extensions/extension_message_bubble_controller.h
|
| index 40e5b81bead2fba0d851d0c343d549b96ea3a94c..c3059c53efdcc9985387dd47ed2fc30de6e26d90 100644
|
| --- a/chrome/browser/extensions/extension_message_bubble_controller.h
|
| +++ b/chrome/browser/extensions/extension_message_bubble_controller.h
|
| @@ -24,8 +24,9 @@ class ExtensionMessageBubbleController {
|
| enum BubbleAction {
|
| ACTION_LEARN_MORE = 0,
|
| ACTION_EXECUTE,
|
| - ACTION_DISMISS,
|
| - ACTION_BOUNDARY, // Must be the last value.
|
| + ACTION_DISMISS_USER_ACTION,
|
| + ACTION_DISMISS_DEACTIVATION,
|
| + ACTION_BOUNDARY, // Must be the last value.
|
| };
|
|
|
| class Delegate {
|
| @@ -74,14 +75,22 @@ class ExtensionMessageBubbleController {
|
| virtual void LogExtensionCount(size_t count) = 0;
|
| virtual void LogAction(BubbleAction action) = 0;
|
|
|
| - // Has the user acknowledged info about the extension the bubble reports.
|
| - virtual bool HasBubbleInfoBeenAcknowledged(const std::string& extension_id);
|
| - virtual void SetBubbleInfoBeenAcknowledged(const std::string& extension_id,
|
| - bool value);
|
| + // Returns a key unique to the type of bubble that can be used to retrieve
|
| + // state specific to the type (e.g., shown for profiles).
|
| + virtual const char* GetKey() = 0;
|
| +
|
| + // Whether the "shown for profiles" set should be cleared if an action is
|
| + // taken on the bubble. This defaults to true, since once an action is
|
| + // taken, the extension will usually either be acknowledged or removed, and
|
| + // the bubble won't show for that extension.
|
| + // This should be false in cases where there is no acknowledgment option
|
| + // (as in the developer-mode extension warning).
|
| + virtual bool ClearProfileSetAfterAction();
|
|
|
| - // Returns the set of profiles for which this bubble has been shown.
|
| - // If profiles are not tracked, returns null (default).
|
| - virtual std::set<Profile*>* GetProfileSet();
|
| + // Has the user acknowledged info about the extension the bubble reports.
|
| + bool HasBubbleInfoBeenAcknowledged(const std::string& extension_id);
|
| + void SetBubbleInfoBeenAcknowledged(const std::string& extension_id,
|
| + bool value);
|
|
|
| protected:
|
| Profile* profile() { return profile_; }
|
| @@ -141,9 +150,11 @@ class ExtensionMessageBubbleController {
|
|
|
| // Callbacks from bubble. Declared virtual for testing purposes.
|
| virtual void OnBubbleAction();
|
| - virtual void OnBubbleDismiss();
|
| + virtual void OnBubbleDismiss(bool dismissed_by_deactivation);
|
| virtual void OnLinkClicked();
|
|
|
| + void ClearProfileListForTesting();
|
| +
|
| static void set_should_ignore_learn_more_for_testing(
|
| bool should_ignore_learn_more);
|
|
|
| @@ -157,6 +168,8 @@ class ExtensionMessageBubbleController {
|
| // Performs cleanup after the bubble closes.
|
| void OnClose();
|
|
|
| + std::set<Profile*>* GetProfileSet();
|
| +
|
| // A weak pointer to the Browser we are associated with. Not owned by us.
|
| Browser* browser_;
|
|
|
|
|