diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-13 21:57:53 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-13 21:57:53 +0000 |
commit | c72ebfe8fb90b1109ce82291d84d2311b6d664e1 (patch) | |
tree | 913463659528bdae35253dc4952e159fbb8ae0f1 /extensions | |
parent | 64eb411b1fd5ad9e431410dda23a9144876db534 (diff) | |
download | chromium_src-c72ebfe8fb90b1109ce82291d84d2311b6d664e1.zip chromium_src-c72ebfe8fb90b1109ce82291d84d2311b6d664e1.tar.gz chromium_src-c72ebfe8fb90b1109ce82291d84d2311b6d664e1.tar.bz2 |
Add an extension bubble explaining which extensions are in dev mode.
Note: This is a brand new changelist (the other one got corrupt somehow). Review happened here: https://codereview.chromium.org/95133002/
In order to accomplish this without too much code duplication I refactored the common code of the newly added SuspiciousExtension bubble into a base class ExtensionMessageBubbleController and a derived class (SuspiciousExtensionBubbleController) to accomodate a new type of bubble (DevModeBubbleController). I also generalized the BubbleView code to just display whatever the controller tells it (and removed mentions of SuspiciousExtensions from it).
The new controller has an action button (Disable) so new functionality was added to accomodate.
BUG=328441
Review URL: https://codereview.chromium.org/114153003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240767 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/common/feature_switch.cc | 7 | ||||
-rw-r--r-- | extensions/common/feature_switch.h | 1 | ||||
-rw-r--r-- | extensions/common/switches.cc | 3 | ||||
-rw-r--r-- | extensions/common/switches.h | 1 |
4 files changed, 12 insertions, 0 deletions
diff --git a/extensions/common/feature_switch.cc b/extensions/common/feature_switch.cc index cc3d9a3..d3fe485 100644 --- a/extensions/common/feature_switch.cc +++ b/extensions/common/feature_switch.cc @@ -20,6 +20,9 @@ class CommonSwitches { : easy_off_store_install( switches::kEasyOffStoreExtensionInstall, FeatureSwitch::DEFAULT_DISABLED), + force_dev_mode_highlighting( + switches::kForceDevModeHighlighting, + FeatureSwitch::DEFAULT_DISABLED), global_commands( switches::kGlobalCommands, FeatureSwitch::DEFAULT_DISABLED), @@ -44,6 +47,7 @@ class CommonSwitches { FeatureSwitch::DEFAULT_DISABLED) {} FeatureSwitch easy_off_store_install; + FeatureSwitch force_dev_mode_highlighting; FeatureSwitch global_commands; FeatureSwitch script_badges; FeatureSwitch script_bubble; @@ -57,6 +61,9 @@ base::LazyInstance<CommonSwitches> g_common_switches = } // namespace +FeatureSwitch* FeatureSwitch::force_dev_mode_highlighting() { + return &g_common_switches.Get().force_dev_mode_highlighting; +} FeatureSwitch* FeatureSwitch::easy_off_store_install() { return &g_common_switches.Get().easy_off_store_install; } diff --git a/extensions/common/feature_switch.h b/extensions/common/feature_switch.h index c140ceb..3387c39 100644 --- a/extensions/common/feature_switch.h +++ b/extensions/common/feature_switch.h @@ -18,6 +18,7 @@ namespace extensions { class FeatureSwitch { public: static FeatureSwitch* easy_off_store_install(); + static FeatureSwitch* force_dev_mode_highlighting(); static FeatureSwitch* global_commands(); static FeatureSwitch* script_badges(); static FeatureSwitch* script_bubble(); diff --git a/extensions/common/switches.cc b/extensions/common/switches.cc index 6e8e271..2c6a39b 100644 --- a/extensions/common/switches.cc +++ b/extensions/common/switches.cc @@ -50,6 +50,9 @@ const char kEventPageSuspendingTime[] = "event-page-unloading-time"; // manifest. const char kExtensionsOnChromeURLs[] = "extensions-on-chrome-urls"; +// Whether to force developer mode extensions highlighting. +const char kForceDevModeHighlighting[] = "force-dev-mode-highlighting"; + // Enables setting global commands through the Extensions Commands API. const char kGlobalCommands[] = "global-commands"; diff --git a/extensions/common/switches.h b/extensions/common/switches.h index 30a2682..c249cc0 100644 --- a/extensions/common/switches.h +++ b/extensions/common/switches.h @@ -21,6 +21,7 @@ extern const char kErrorConsole[]; extern const char kEventPageIdleTime[]; extern const char kEventPageSuspendingTime[]; extern const char kExtensionsOnChromeURLs[]; +extern const char kForceDevModeHighlighting[]; extern const char kGlobalCommands[]; extern const char kPromptForExternalExtensions[]; extern const char kScriptBadges[]; |