Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(492)

Unified Diff: content/ppapi_plugin/ppapi_thread.cc

Issue 2514593002: Field trial synchronization to PPAPI process. (Closed)
Patch Set: Fix namespace. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.h ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « content/ppapi_plugin/ppapi_thread.h ('k') | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698