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

Unified Diff: content/shell/browser/shell_browser_main_parts.cc

Issue 1812883003: Enable features API for content shell and webview (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « content/shell/browser/shell_browser_main_parts.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_browser_main_parts.cc
diff --git a/content/shell/browser/shell_browser_main_parts.cc b/content/shell/browser/shell_browser_main_parts.cc
index 9b17cd58040a09ad74ba1528ea318e995e140ca1..ae965ddc6d96c8ad908bb48f5b52d2429400cb92 100644
--- a/content/shell/browser/shell_browser_main_parts.cc
+++ b/content/shell/browser/shell_browser_main_parts.cc
@@ -7,6 +7,7 @@
#include "base/base_switches.h"
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/message_loop/message_loop.h"
@@ -133,6 +134,18 @@ void ShellBrowserMainParts::PreEarlyInitialization() {
#endif
}
+int ShellBrowserMainParts::PreCreateThreads() {
+ const base::CommandLine* command_line =
Alexei Svitkine (slow) 2016/03/18 15:03:42 Indent is wrong.
Changwan Ryu 2016/03/23 09:47:36 Done.
+ base::CommandLine::ForCurrentProcess();
+ scoped_ptr<base::FeatureList> feature_list(new base::FeatureList);
+ feature_list->InitializeFromCommandLine(
+ command_line->GetSwitchValueASCII(switches::kEnableFeatures),
+ command_line->GetSwitchValueASCII(switches::kDisableFeatures));
+
+ base::FeatureList::SetInstance(std::move(feature_list));
Alexei Svitkine (slow) 2016/03/18 15:03:42 So this fails because an instance was already regi
Changwan Ryu 2016/03/23 09:47:36 Please check crbug.com/596021 for the different ap
+ return 0;
+}
+
void ShellBrowserMainParts::InitializeBrowserContexts() {
set_browser_context(new ShellBrowserContext(false, net_log_.get()));
set_off_the_record_browser_context(
« no previous file with comments | « content/shell/browser/shell_browser_main_parts.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698