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

Unified Diff: chrome/renderer/chrome_render_thread_observer.cc

Issue 2732213004: Move FieldTrialRecorder mojom to content (Closed)
Patch Set: initialize FieldTrialList for RenderThreadImplBrowserTest Created 3 years, 9 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/renderer/chrome_render_thread_observer.h ('k') | content/browser/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 ebfe32922014601f2eccd7fcbbbba5167ab55c3e..0fc7c0f1829d95da05b61a38ab7b0470626c32c1 100644
--- a/chrome/renderer/chrome_render_thread_observer.cc
+++ b/chrome/renderer/chrome_render_thread_observer.cc
@@ -19,7 +19,6 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/memory/weak_ptr.h"
-#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "base/metrics/statistics_recorder.h"
#include "base/path_service.h"
@@ -30,7 +29,6 @@
#include "build/build_config.h"
#include "chrome/common/child_process_logging.h"
#include "chrome/common/chrome_paths.h"
-#include "chrome/common/field_trial_recorder.mojom.h"
#include "chrome/common/media/media_resource_provider.h"
#include "chrome/common/net/net_resource_provider.h"
#include "chrome/common/render_messages.h"
@@ -236,12 +234,8 @@ void CreateResourceUsageReporter(
bool ChromeRenderThreadObserver::is_incognito_process_ = false;
ChromeRenderThreadObserver::ChromeRenderThreadObserver()
- : field_trial_syncer_(this),
- visited_link_slave_(new visitedlink::VisitedLinkSlave),
+ : visited_link_slave_(new visitedlink::VisitedLinkSlave),
weak_factory_(this) {
- const base::CommandLine& command_line =
- *base::CommandLine::ForCurrentProcess();
-
RenderThread* thread = RenderThread::Get();
resource_delegate_.reset(new RendererResourceDelegate());
thread->SetResourceDispatcherDelegate(resource_delegate_.get());
@@ -254,9 +248,6 @@ ChromeRenderThreadObserver::ChromeRenderThreadObserver()
media::SetLocalizedStringProvider(
chrome_common_media::LocalizedStringProvider);
- field_trial_syncer_.InitFieldTrialObserving(command_line,
- switches::kSingleProcess);
-
// chrome-native: is a scheme used for placeholder navigations that allow
// UIs to be drawn with platform native widgets instead of HTML. These pages
// should not be accessible, and should also be treated as empty documents
@@ -295,15 +286,6 @@ void ChromeRenderThreadObserver::OnRenderProcessShutdown() {
renderer_configuration_bindings_.CloseAllBindings();
}
-void ChromeRenderThreadObserver::OnFieldTrialGroupFinalized(
- const std::string& trial_name,
- const std::string& group_name) {
- chrome::mojom::FieldTrialRecorderPtr field_trial_recorder;
- content::RenderThread::Get()->GetRemoteInterfaces()->GetInterface(
- &field_trial_recorder);
- field_trial_recorder->FieldTrialActivated(trial_name);
-}
-
void ChromeRenderThreadObserver::SetInitialConfiguration(
bool is_incognito_process) {
is_incognito_process_ = is_incognito_process;
@@ -317,7 +299,7 @@ void ChromeRenderThreadObserver::SetContentSettingRules(
void ChromeRenderThreadObserver::SetFieldTrialGroup(
const std::string& trial_name,
const std::string& group_name) {
- field_trial_syncer_.OnSetFieldTrialGroup(trial_name, group_name);
+ RenderThread::Get()->SetFieldTrialGroup(trial_name, group_name);
}
void ChromeRenderThreadObserver::OnRendererConfigurationAssociatedRequest(
« no previous file with comments | « chrome/renderer/chrome_render_thread_observer.h ('k') | content/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698