Index: chrome/browser/about_flags.cc |
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc |
index 436e76edab66f47f4aa557c2e39e4a040d189038..ec530d9987b8ef862e7ec831a435d72f1504e006 100644 |
--- a/chrome/browser/about_flags.cc |
+++ b/chrome/browser/about_flags.cc |
@@ -12,9 +12,12 @@ |
#include "base/command_line.h" |
#include "base/memory/singleton.h" |
#include "base/string_number_conversions.h" |
+#include "base/utf_string_conversions.h" |
#include "base/values.h" |
+#include "chrome/browser/plugin_updater.h" |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/prefs/scoped_user_pref_update.h" |
+#include "chrome/common/chrome_content_client.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/pref_names.h" |
#include "content/browser/user_metrics.h" |
@@ -672,10 +675,21 @@ void FlagsState::SetExperimentEnabled( |
DCHECK(e); |
if (e->type == Experiment::SINGLE_VALUE) { |
- if (enable) |
+ if (enable) { |
enabled_experiments.insert(internal_name); |
- else |
+ // If enabling NaCl, make sure the plugin is also enabled. See bug |
+ // http://code.google.com/p/chromium/issues/detail?id=81010 for more |
+ // information. |
+ // TODO(dspringer): When NaCl is on by default, remove this code. |
+ if (internal_name == "enable-nacl") { |
jam
2011/05/19 22:56:46
is there no constant for this? kEnableNaCl?
der Springer
2011/05/20 17:47:16
Done.
|
+ PluginUpdater* plugin_updater = PluginUpdater::GetInstance(); |
+ string16 nacl_plugin_name = |
+ ASCIIToUTF16(chrome::ChromeContentClient::kNaClPluginName); |
+ plugin_updater->EnablePluginGroup(true, nacl_plugin_name); |
+ } |
+ } else { |
enabled_experiments.erase(internal_name); |
+ } |
} else { |
if (enable) { |
// Enable the first choice. |