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

Unified Diff: content/ppapi_plugin/ppapi_thread.h

Issue 2514593002: Field trial synchronization to PPAPI process. (Closed)
Patch Set: 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
Index: content/ppapi_plugin/ppapi_thread.h
diff --git a/content/ppapi_plugin/ppapi_thread.h b/content/ppapi_plugin/ppapi_thread.h
index a3b322bb7aa6a07bca4082174d29f60f9aeb30f4..43bcd398bbf13a8ec71b3a97da6dd9bc44d05e97 100644
--- a/content/ppapi_plugin/ppapi_thread.h
+++ b/content/ppapi_plugin/ppapi_thread.h
@@ -13,9 +13,11 @@
#include "base/compiler_specific.h"
#include "base/macros.h"
+#include "base/metrics/field_trial.h"
#include "base/process/process.h"
#include "base/scoped_native_library.h"
#include "build/build_config.h"
+#include "components/variations/child_process_field_trial_syncer.h"
#include "content/child/child_thread_impl.h"
#include "content/public/common/pepper_plugin_info.h"
#include "ppapi/c/pp_module.h"
@@ -50,7 +52,8 @@ class PpapiBlinkPlatformImpl;
class PpapiThread : public ChildThreadImpl,
public ppapi::proxy::PluginDispatcher::PluginDelegate,
- public ppapi::proxy::PluginProxyDelegate {
+ public ppapi::proxy::PluginProxyDelegate,
+ public base::FieldTrialList::Observer {
public:
PpapiThread(const base::CommandLine& command_line, bool is_broker);
~PpapiThread() override;
@@ -110,6 +113,10 @@ class PpapiThread : public ChildThreadImpl,
void OnCrash();
void OnHang();
+ // base::FieldTrialList::Observer:
+ void OnFieldTrialGroupFinalized(const std::string& trial_name,
+ const std::string& group_name) override;
+
// Sets up the channel to the given renderer. If |renderer_pid| is
// base::kNullProcessId, the channel is set up to the browser. On success,
// returns true and fills the given ChannelHandle with the information from
@@ -172,6 +179,8 @@ class PpapiThread : public ChildThreadImpl,
base::win::ScopedHandle peer_handle_;
#endif
+ variations::ChildProcessFieldTrialSyncer field_trial_syncer_;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread);
};

Powered by Google App Engine
This is Rietveld 408576698