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

Unified Diff: content/browser/browser_main_loop.cc

Issue 1812883003: Enable features API for content shell and webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment and fix a nit Created 4 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 | « base/feature_list_unittest.cc ('k') | content/browser/loader/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/browser_main_loop.cc
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 0959081b941f108b6bc3b82313420424e7e808e5..8df360a3d155a28b4e6ef80581d8285319b97bdd 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -695,9 +695,12 @@ int BrowserMainLoop::PreCreateThreads() {
result_code_ = parts_->PreCreateThreads();
}
- // Initialize an instance of FeatureList. This will be a no-op if an instance
- // was already set up by the embedder.
- base::FeatureList::InitializeInstance();
+ // Initialize from command line flags only if we haven't yet.
no sievers 2016/03/30 18:36:03 nit: the 'only if we haven't yet' comment does not
Changwan Ryu 2016/03/31 00:31:44 Updated the comment.
+ const base::CommandLine* command_line =
+ base::CommandLine::ForCurrentProcess();
+ base::FeatureList::InitializeInstance(
+ command_line->GetSwitchValueASCII(switches::kEnableFeatures),
+ command_line->GetSwitchValueASCII(switches::kDisableFeatures));
// TODO(chrisha): Abstract away this construction mess to a helper function,
// once MemoryPressureMonitor is made a concrete class.
« no previous file with comments | « base/feature_list_unittest.cc ('k') | content/browser/loader/resource_dispatcher_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698