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

Unified Diff: chrome/renderer/chrome_render_thread_observer.cc

Issue 2453313004: Convert FieldTrialActivated to use mojo. (Closed)
Patch Set: Convert FieldTrialActivated to use mojo. 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 | « chrome/renderer/chrome_render_thread_observer.h ('k') | chrome/utility/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_render_thread_observer.cc
diff --git a/chrome/renderer/chrome_render_thread_observer.cc b/chrome/renderer/chrome_render_thread_observer.cc
index fca78967da123fb0a3e3df76b658ef41644f82da..bb026dcae21521955a564d2f18cbc2df9a2501c2 100644
--- a/chrome/renderer/chrome_render_thread_observer.cc
+++ b/chrome/renderer/chrome_render_thread_observer.cc
@@ -46,6 +46,7 @@
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "net/base/net_errors.h"
#include "net/base/net_module.h"
+#include "services/service_manager/public/cpp/interface_provider.h"
#include "services/service_manager/public/cpp/interface_registry.h"
#include "third_party/WebKit/public/web/WebCache.h"
#include "third_party/WebKit/public/web/WebDocument.h"
@@ -292,8 +293,10 @@ void ChromeRenderThreadObserver::OnRenderProcessShutdown() {
void ChromeRenderThreadObserver::OnFieldTrialGroupFinalized(
const std::string& trial_name,
const std::string& group_name) {
- content::RenderThread::Get()->Send(
- new ChromeViewHostMsg_FieldTrialActivated(trial_name));
+ if (!field_trial_recorder_)
Sam McNally 2016/11/07 06:56:54 OnFieldTrialGroupFinalized seems like it should on
nigeltao1 2016/11/10 06:23:04 I made it a local.
+ content::RenderThread::Get()->GetRemoteInterfaces()->GetInterface(
+ &field_trial_recorder_);
+ field_trial_recorder_->FieldTrialActivated(trial_name);
}
void ChromeRenderThreadObserver::OnSetIsIncognitoProcess(
« no previous file with comments | « chrome/renderer/chrome_render_thread_observer.h ('k') | chrome/utility/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698