Skip to content

Instantly share code, notes, and snippets.

@gitchs
Created October 12, 2016 10:08
Show Gist options
  • Select an option

  • Save gitchs/12d5f6093201cd8c4095646b935141f1 to your computer and use it in GitHub Desktop.

Select an option

Save gitchs/12d5f6093201cd8c4095646b935141f1 to your computer and use it in GitHub Desktop.
diff --git a/chrome/browser/ui/extensions/extension_message_bubble_factory.cc b/chrome/browser/ui/extensions/extension_message_bubble_factory.cc
index 949bd68..fe53055 100644
--- a/chrome/browser/ui/extensions/extension_message_bubble_factory.cc
+++ b/chrome/browser/ui/extensions/extension_message_bubble_factory.cc
@@ -35,24 +35,11 @@ base::LazyInstance<std::set<Profile*> > g_profiles_evaluated =
ExtensionMessageBubbleFactory::OverrideForTesting g_override_for_testing =
ExtensionMessageBubbleFactory::NO_OVERRIDE;
-const char kEnableDevModeWarningExperimentName[] =
- "ExtensionDeveloperModeWarning";
#if !defined(OS_WIN) && !defined(OS_MACOSX)
const char kEnableProxyWarningExperimentName[] = "ExtensionProxyWarning";
#endif
-bool IsExperimentEnabled(const char* experiment_name) {
- // Don't allow turning it off via command line.
- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kForceFieldTrials)) {
- std::string forced_trials =
- command_line->GetSwitchValueASCII(switches::kForceFieldTrials);
- if (forced_trials.find(experiment_name))
- return true;
- }
- return base::FieldTrialList::FindFullName(experiment_name) == "Enabled";
-}
bool EnableSuspiciousExtensionsBubble() {
return g_override_for_testing ==
@@ -80,17 +67,7 @@ bool EnableProxyOverrideBubble() {
}
bool EnableDevModeBubble() {
- if (extensions::FeatureSwitch::force_dev_mode_highlighting()->IsEnabled())
- return true;
-
-#if defined(OS_WIN)
- if (chrome::GetChannel() >= version_info::Channel::BETA)
- return true;
-#endif
-
- return g_override_for_testing ==
- ExtensionMessageBubbleFactory::OVERRIDE_ENABLED ||
- IsExperimentEnabled(kEnableDevModeWarningExperimentName);
+ return false;
}
} // namespace
@gitchs
Copy link
Author

gitchs commented Oct 12, 2016

Chrome's develop mode extension warming is annoying, add a patch to it to remove it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment