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

Unified Diff: content/common/child_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: 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/common/child_process_host_impl.cc
diff --git a/content/common/child_process_host_impl.cc b/content/common/child_process_host_impl.cc
index 1aa93b529873b9e7d342ad3e3f955ac36638385f..769e6ccaca1826ee898e99021c5af207dcbd75d7 100644
--- a/content/common/child_process_host_impl.cc
+++ b/content/common/child_process_host_impl.cc
@@ -8,6 +8,7 @@
#include "base/atomic_sequence_num.h"
#include "base/command_line.h"
+#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/hash.h"
#include "base/logging.h"
@@ -203,6 +204,18 @@ int ChildProcessHostImpl::GenerateChildProcessUniqueId() {
return id;
}
+void ChildProcessHostImpl::CopyEnableDisableFeatureFlags(
+ base::CommandLine* cmd_line) {
+ std::string enabled_features;
+ std::string disabled_features;
+ base::FeatureList::GetInstance()->GetFeatureOverrides(&enabled_features,
+ &disabled_features);
+ if (!enabled_features.empty())
+ cmd_line->AppendSwitchASCII(switches::kEnableFeatures, enabled_features);
+ if (!disabled_features.empty())
+ cmd_line->AppendSwitchASCII(switches::kDisableFeatures, disabled_features);
+}
+
uint64_t ChildProcessHostImpl::ChildProcessUniqueIdToTracingProcessId(
int child_process_id) {
// In single process mode, all the children are hosted in the same process,

Powered by Google App Engine
This is Rietveld 408576698