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 4c7b64120193dc95620eeb9a484252b37f6f2813..2180801709650803996a5e82c670e6f2e4aed5b9 100644 |
--- a/content/browser/ppapi_plugin_process_host.cc |
+++ b/content/browser/ppapi_plugin_process_host.cc |
@@ -402,7 +402,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 +479,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 +500,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() { |