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

Unified Diff: chrome/browser/renderer_host/chrome_render_message_filter.cc

Issue 700953002: Send all field trials from the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@finch4
Patch Set: Responded to comments. Created 5 years, 11 months 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 | « chrome/browser/renderer_host/chrome_render_message_filter.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/chrome_render_message_filter.cc
diff --git a/chrome/browser/renderer_host/chrome_render_message_filter.cc b/chrome/browser/renderer_host/chrome_render_message_filter.cc
index 2ffe311d8a31ae7032c17260eb12e6b8e4d9bda1..78860b50ed1c63ba99b6a24661c3693f43c22fab 100644
--- a/chrome/browser/renderer_host/chrome_render_message_filter.cc
+++ b/chrome/browser/renderer_host/chrome_render_message_filter.cc
@@ -8,6 +8,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
+#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/content_settings/cookie_settings.h"
@@ -84,6 +85,8 @@ bool ChromeRenderMessageFilter::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ChromeViewHostMsg_IsCrashReportingEnabled,
OnIsCrashReportingEnabled)
#endif
+ IPC_MESSAGE_HANDLER(ChromeViewHostMsg_FieldTrialActivated,
+ OnFieldTrialActivated)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -363,3 +366,11 @@ void ChromeRenderMessageFilter::OnIsCrashReportingEnabled(bool* enabled) {
*enabled = ChromeMetricsServiceAccessor::IsCrashReportingEnabled();
}
#endif
+
+void ChromeRenderMessageFilter::OnFieldTrialActivated(
+ const std::string& trial_name) {
+ // Activate the trial in the browser process to match its state in the
+ // renderer. This is done by calling FindFullName which finalizes the group
+ // and activates the trial.
+ base::FieldTrialList::FindFullName(trial_name);
+}
« no previous file with comments | « chrome/browser/renderer_host/chrome_render_message_filter.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698