Index: android_webview/browser/aw_browser_main_parts.cc |
diff --git a/android_webview/browser/aw_browser_main_parts.cc b/android_webview/browser/aw_browser_main_parts.cc |
index 54a3a52802a9ece09ef23c946aa12e0f8907c1a6..be57a7411195e7a454e54c91fa54676a5b8061c9 100644 |
--- a/android_webview/browser/aw_browser_main_parts.cc |
+++ b/android_webview/browser/aw_browser_main_parts.cc |
@@ -17,6 +17,7 @@ |
#include "base/android/locale_utils.h" |
#include "base/android/memory_pressure_listener_android.h" |
#include "base/command_line.h" |
+#include "base/feature_list.h" |
#include "base/files/file_path.h" |
#include "base/i18n/rtl.h" |
#include "base/path_service.h" |
@@ -78,12 +79,21 @@ int AwBrowserMainParts::PreCreateThreads() { |
base::android::MemoryPressureListenerAndroid::RegisterSystemCallback( |
base::android::AttachCurrentThread()); |
DeferredGpuCommandService::SetInstance(); |
- if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kSingleProcess)) { |
+ |
+ const base::CommandLine* command_line = |
+ base::CommandLine::ForCurrentProcess(); |
+ |
+ if (!command_line->HasSwitch(switches::kSingleProcess)) { |
// Create the renderers crash manager on the UI thread. |
breakpad::CrashMicroDumpManager::GetInstance(); |
} |
+ 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)); |
+ |
return content::RESULT_CODE_NORMAL_EXIT; |
} |