Chromium Code Reviews| 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..da960e2040e3356c04359783bd5825b7fbc6ca32 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,13 @@ 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. |
| + if (channel) { |
| + chrome::mojom::FieldTrialGroupSetterAssociatedPtr ftgs_interface; |
|
nigeltao1
2017/01/20 00:35:59
I dropped some temporary printf's here, and it loo
Sam McNally
2017/01/20 02:35:38
20 to 30 notifications or 20 to 30 messages? Ideal
|
| + channel->GetRemoteAssociatedInterface(&ftgs_interface); |
| + ftgs_interface->SetFieldTrialGroup(field_trial_name, group_name); |
| + } |
| } |
| } |