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

Unified Diff: content/renderer/renderer_main.cc

Issue 1355613002: Add FeatureList instance to renderers and propgate enable/disable flags. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove kDisableFeatures from chrome_switches.h. Created 5 years, 3 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 | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/renderer_main.cc
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc
index 3a34300d2d65ea4659564afebbc07711485a2679..3a463eaffcc4f9734ea2a227f10427ef95debfc2 100644
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/debug/debugger.h"
#include "base/debug/leak_annotations.h"
+#include "base/feature_list.h"
#include "base/i18n/rtl.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/field_trial.h"
@@ -159,6 +160,12 @@ int RendererMain(const MainFunctionParams& parameters) {
DCHECK(result);
}
+ scoped_ptr<base::FeatureList> feature_list(new base::FeatureList);
+ feature_list->InitializeFromCommandLine(
+ parsed_command_line.GetSwitchValueASCII(switches::kEnableFeatures),
+ parsed_command_line.GetSwitchValueASCII(switches::kDisableFeatures));
+ base::FeatureList::SetInstance(feature_list.Pass());
+
// PlatformInitialize uses FieldTrials, so this must happen later.
platform.PlatformInitialize();
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698