| Index: content/browser/ppapi_plugin_process_host.cc
|
| diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
|
| index 83cb49c6087e8a1094f8feb1c06ed26ddb6d3890..04595bb600d8ce3380492d3836ca18f41c93c877 100644
|
| --- a/content/browser/ppapi_plugin_process_host.cc
|
| +++ b/content/browser/ppapi_plugin_process_host.cc
|
| @@ -377,6 +377,7 @@ bool PpapiPluginProcessHost::Init(const PepperPluginInfo& info) {
|
| cmd_line->AppendSwitchASCII(switches::kProcessType,
|
| is_broker_ ? switches::kPpapiBrokerProcess
|
| : switches::kPpapiPluginProcess);
|
| + BrowserChildProcessHostImpl::CopyFeatureAndFieldTrialFlags(cmd_line);
|
|
|
| #if defined(OS_WIN)
|
| cmd_line->AppendArg(is_broker_ ? switches::kPrefetchArgumentPpapiBroker
|
| @@ -402,7 +403,7 @@ bool PpapiPluginProcessHost::Init(const PepperPluginInfo& info) {
|
| cmd_line->CopySwitchesFrom(browser_command_line, kPluginForwardSwitches,
|
| arraysize(kPluginForwardSwitches));
|
|
|
| - // Copy any flash args over and introduce field trials if necessary.
|
| + // Copy any flash args over if necessary.
|
| // TODO(vtl): Stop passing flash args in the command line, or windows is
|
| // going to explode.
|
| std::string existing_args =
|
| @@ -479,6 +480,8 @@ bool PpapiPluginProcessHost::OnMessageReceived(const IPC::Message& msg) {
|
| IPC_BEGIN_MESSAGE_MAP(PpapiPluginProcessHost, msg)
|
| IPC_MESSAGE_HANDLER(PpapiHostMsg_ChannelCreated,
|
| OnRendererPluginChannelCreated)
|
| + IPC_MESSAGE_HANDLER(PpapiHostMsg_FieldTrialActivated,
|
| + OnFieldTrialActivated);
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
| DCHECK(handled);
|
| @@ -498,6 +501,14 @@ void PpapiPluginProcessHost::OnChannelConnected(int32_t peer_pid) {
|
| pending_requests_.clear();
|
| }
|
|
|
| +void PpapiPluginProcessHost::OnFieldTrialActivated(
|
| + const std::string& trial_name) {
|
| + // Activate the trial in the browser process to match its state in the
|
| + // PPAPI process. This is done by calling FindFullName which finalizes the
|
| + // group and activates the trial.
|
| + base::FieldTrialList::FindFullName(trial_name);
|
| +}
|
| +
|
| // Called when the browser <--> plugin channel has an error. This normally
|
| // means the plugin has crashed.
|
| void PpapiPluginProcessHost::OnChannelError() {
|
|
|