| Index: chrome/browser/extensions/suspicious_extension_bubble_controller.cc
|
| ===================================================================
|
| --- chrome/browser/extensions/suspicious_extension_bubble_controller.cc (revision 269890)
|
| +++ chrome/browser/extensions/suspicious_extension_bubble_controller.cc (working copy)
|
| @@ -17,10 +17,13 @@
|
| #include "content/public/browser/user_metrics.h"
|
| #include "extensions/browser/extension_prefs.h"
|
| #include "extensions/browser/extension_system.h"
|
| +#include "extensions/common/extension.h"
|
| #include "grit/chromium_strings.h"
|
| #include "grit/generated_resources.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
|
|
| +using extensions::ExtensionMessageBubbleController;
|
| +
|
| namespace {
|
|
|
| base::LazyInstance<std::set<Profile*> > g_shown_for_profiles =
|
| @@ -29,6 +32,38 @@
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // SuspiciousExtensionBubbleDelegate
|
|
|
| +class SuspiciousExtensionBubbleDelegate
|
| + : public ExtensionMessageBubbleController::Delegate {
|
| + public:
|
| + explicit SuspiciousExtensionBubbleDelegate(Profile* profile);
|
| + virtual ~SuspiciousExtensionBubbleDelegate();
|
| +
|
| + // ExtensionMessageBubbleController::Delegate methods.
|
| + virtual bool ShouldIncludeExtension(const std::string& extension_id) OVERRIDE;
|
| + virtual void AcknowledgeExtension(
|
| + const std::string& extension_id,
|
| + ExtensionMessageBubbleController::BubbleAction user_action) OVERRIDE;
|
| + virtual void PerformAction(const extensions::ExtensionIdList& list) OVERRIDE;
|
| + virtual base::string16 GetTitle() const OVERRIDE;
|
| + virtual base::string16 GetMessageBody() const OVERRIDE;
|
| + virtual base::string16 GetOverflowText(
|
| + const base::string16& overflow_count) const OVERRIDE;
|
| + virtual base::string16 GetLearnMoreLabel() const OVERRIDE;
|
| + virtual GURL GetLearnMoreUrl() const OVERRIDE;
|
| + virtual base::string16 GetActionButtonLabel() const OVERRIDE;
|
| + virtual base::string16 GetDismissButtonLabel() const OVERRIDE;
|
| + virtual bool ShouldShowExtensionList() const OVERRIDE;
|
| + virtual void LogExtensionCount(size_t count) OVERRIDE;
|
| + virtual void LogAction(
|
| + ExtensionMessageBubbleController::BubbleAction action) OVERRIDE;
|
| +
|
| + private:
|
| + // Our profile. Weak, not owned by us.
|
| + Profile* profile_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SuspiciousExtensionBubbleDelegate);
|
| +};
|
| +
|
| SuspiciousExtensionBubbleDelegate::SuspiciousExtensionBubbleDelegate(
|
| Profile* profile)
|
| : profile_(profile) {}
|
|
|