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

Unified Diff: chrome/browser/metrics/field_trial_synchronizer.cc

Issue 2642263002: Convert ChromeViewMsg_SetFieldTrialGroup to use mojo. (Closed)
Patch Set: Convert ChromeViewMsg_SetFieldTrialGroup to use mojo. Created 3 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/field_trial_recorder.h ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/field_trial_synchronizer.cc
diff --git a/chrome/browser/metrics/field_trial_synchronizer.cc b/chrome/browser/metrics/field_trial_synchronizer.cc
index 842f25db6d6156577dc889f860a1964e362a74b8..450b663099e8525792252439d227de53b59ef7a6 100644
--- a/chrome/browser/metrics/field_trial_synchronizer.cc
+++ b/chrome/browser/metrics/field_trial_synchronizer.cc
@@ -7,7 +7,7 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/threading/thread.h"
-#include "chrome/common/render_messages.h"
+#include "chrome/common/field_trial.mojom.h"
#include "components/variations/variations_util.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host.h"
@@ -42,8 +42,15 @@ void FieldTrialSynchronizer::NotifyAllRenderers(
for (content::RenderProcessHost::iterator it(
content::RenderProcessHost::AllHostsIterator());
!it.IsAtEnd(); it.Advance()) {
- it.GetCurrentValue()->Send(new ChromeViewMsg_SetFieldTrialGroup(
- field_trial_name, group_name));
+ IPC::ChannelProxy* channel = it.GetCurrentValue()->GetChannel();
+ // channel might be NULL in tests.
sky 2017/01/20 17:12:59 optional: NULL -> null
+ if (channel) {
+ chrome::mojom::FieldTrialGroupSetterAssociatedPtr
+ field_trial_group_setter;
+ channel->GetRemoteAssociatedInterface(&field_trial_group_setter);
sky 2017/01/20 17:12:59 It seems weird to me to configure something via an
nigeltao1 2017/01/20 22:40:58 Yeah, I did say "But let me know if I should look
+ field_trial_group_setter->SetFieldTrialGroup(field_trial_name,
+ group_name);
+ }
}
}
« no previous file with comments | « chrome/browser/field_trial_recorder.h ('k') | chrome/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698