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

Unified Diff: android_webview/browser/aw_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: do not override dummy instance 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
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;
}
« no previous file with comments | « no previous file | chromecast/browser/cast_browser_main_parts.cc » ('j') | content/shell/browser/shell_browser_main_parts.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698