| Index: chromecast/browser/cast_browser_main_parts.cc
|
| diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc
|
| index b4202898a59a35bdca35fcae6509eb4dc46d85cc..e5823ca8fd6a2984e2310ecf2c1bd9c225aaadbb 100644
|
| --- a/chromecast/browser/cast_browser_main_parts.cc
|
| +++ b/chromecast/browser/cast_browser_main_parts.cc
|
| @@ -10,6 +10,7 @@
|
| #include <string>
|
|
|
| #include "base/command_line.h"
|
| +#include "base/feature_list.h"
|
| #include "base/files/file_util.h"
|
| #include "base/macros.h"
|
| #include "base/message_loop/message_loop.h"
|
| @@ -295,6 +296,19 @@ void CastBrowserMainParts::ToolkitInitialized() {
|
| }
|
|
|
| int CastBrowserMainParts::PreCreateThreads() {
|
| + // The only case GetInstance() returns null should be when you are running a
|
| + // C++ test, in which case currently we do not support command line features.
|
| + // This allows Test::SetUp() to enable/disable features as necessary. See
|
| + // crbug.com/596021 for more details.
|
| + if (!base::FeatureList::GetInstance()) {
|
| + base::CommandLine* command_line = 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));
|
| + }
|
| +
|
| #if defined(OS_ANDROID)
|
| // GPU process is started immediately after threads are created, requiring
|
| // CrashDumpManager to be initialized beforehand.
|
|
|