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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 1928863002: Enable FeatureList for the GPU process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments from jam. Created 4 years, 8 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
Index: content/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 4b16440bcf874afb8f1f9ce748353d2e15527f13..cbb36280321247c035e3759f6f7812b8535452a2 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -26,7 +26,6 @@
#include "base/macros.h"
#include "base/memory/shared_memory.h"
#include "base/memory/shared_memory_handle.h"
-#include "base/metrics/field_trial.h"
#include "base/metrics/histogram.h"
#include "base/metrics/persistent_histogram_allocator.h"
#include "base/metrics/persistent_memory_allocator.h"
@@ -446,24 +445,6 @@ std::string UintVectorToString(const std::vector<unsigned>& vector) {
return str;
}
-// Copies kEnableFeatures and kDisableFeatures to the renderer command line.
-// Generates them from the FeatureList override state, to take into account
-// overrides from FieldTrials.
-void CopyEnableDisableFeatureFlagsToRenderer(base::CommandLine* renderer_cmd) {
- std::string enabled_features;
- std::string disabled_features;
- base::FeatureList::GetInstance()->GetFeatureOverrides(&enabled_features,
- &disabled_features);
- if (!enabled_features.empty()) {
- renderer_cmd->AppendSwitchASCII(switches::kEnableFeatures,
- enabled_features);
- }
- if (!disabled_features.empty()) {
- renderer_cmd->AppendSwitchASCII(switches::kDisableFeatures,
- disabled_features);
- }
-}
-
} // namespace
RendererMainThreadFactoryFunction g_renderer_main_thread_factory = NULL;
@@ -1313,16 +1294,6 @@ void RenderProcessHostImpl::AppendRendererCommandLine(
GetContentClient()->browser()->GetApplicationLocale();
command_line->AppendSwitchASCII(switches::kLang, locale);
- // If we run base::FieldTrials, we want to pass to their state to the
- // renderer so that it can act in accordance with each state, or record
- // histograms relating to the base::FieldTrial states.
- std::string field_trial_states;
- base::FieldTrialList::AllStatesToString(&field_trial_states);
- if (!field_trial_states.empty()) {
- command_line->AppendSwitchASCII(switches::kForceFieldTrials,
- field_trial_states);
- }
-
GetContentClient()->browser()->AppendExtraCommandLineSwitches(command_line,
GetID());
@@ -1551,7 +1522,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
renderer_cmd->CopySwitchesFrom(browser_cmd, kSwitchNames,
arraysize(kSwitchNames));
- CopyEnableDisableFeatureFlagsToRenderer(renderer_cmd);
+ BrowserChildProcessHostImpl::CopyFeatureAndFieldTrialFlags(renderer_cmd);
if (browser_cmd.HasSwitch(switches::kTraceStartup) &&
BrowserMainLoop::GetInstance()->is_tracing_startup_for_duration()) {

Powered by Google App Engine
This is Rietveld 408576698