Index: content/ppapi_plugin/ppapi_thread.cc |
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc |
index 5829f837086061c51d729fed63072f4311e472b5..71c436ce56d4dca36fa3c184770d183fa64a75ed 100644 |
--- a/content/ppapi_plugin/ppapi_thread.cc |
+++ b/content/ppapi_plugin/ppapi_thread.cc |
@@ -111,7 +111,8 @@ PpapiThread::PpapiThread(const base::CommandLine& command_line, bool is_broker) |
plugin_globals_(GetIOTaskRunner()), |
connect_instance_func_(NULL), |
local_pp_module_(base::RandInt(0, std::numeric_limits<PP_Module>::max())), |
- next_plugin_dispatcher_id_(1) { |
+ next_plugin_dispatcher_id_(1), |
+ field_trial_syncer_(this) { |
plugin_globals_.SetPluginProxyDelegate(this); |
plugin_globals_.set_command_line( |
command_line.GetSwitchValueASCII(switches::kPpapiFlashArgs)); |
@@ -133,6 +134,8 @@ PpapiThread::PpapiThread(const base::CommandLine& command_line, bool is_broker) |
base::DiscardableMemoryAllocator::SetInstance( |
ChildThreadImpl::discardable_shared_memory_manager()); |
} |
+ field_trial_syncer_.InitFieldTrialObserving(command_line, |
+ switches::kSingleProcess); |
} |
PpapiThread::~PpapiThread() { |
@@ -483,6 +486,12 @@ void PpapiThread::OnHang() { |
base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(1)); |
} |
+void PpapiThread::OnFieldTrialGroupFinalized(const std::string& trial_name, |
+ const std::string& group_name) { |
+ // IPC to the browser process to tell it the specified trial was activated. |
+ Send(new PpapiHostMsg_FieldTrialActivated(trial_name)); |
+} |
+ |
bool PpapiThread::SetupChannel(base::ProcessId renderer_pid, |
int renderer_child_id, |
bool incognito, |