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

Unified Diff: content/browser/android/content_startup_flags.cc

Issue 914373003: Exceptions for Web Notifications and the Push API by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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: content/browser/android/content_startup_flags.cc
diff --git a/content/browser/android/content_startup_flags.cc b/content/browser/android/content_startup_flags.cc
index 7202397494e9366954f521694cd8eb4af1a5e54d..ceebf043eabf35656de630238a7bbf8b2ed1c28f 100644
--- a/content/browser/android/content_startup_flags.cc
+++ b/content/browser/android/content_startup_flags.cc
@@ -4,6 +4,7 @@
#include "content/browser/android/content_startup_flags.h"
+#include "base/android/build_info.h"
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/logging.h"
@@ -18,6 +19,12 @@
#include "ui/native_theme/native_theme_switches.h"
namespace content {
+namespace {
+
+// Android SDK API level for the Jelly Bean release.
+const int kAndroidJellyBeanApiLevel = 16;
+
+} // namespace
void SetContentCommandLineFlags(bool single_process,
const std::string& plugin_descriptor) {
@@ -72,6 +79,12 @@ void SetContentCommandLineFlags(bool single_process,
parsed_command_line->AppendSwitch(switches::kDisableGpuShaderDiskCache);
+ // Web Notifications are only supported on Android JellyBean and beyond.
+ if (base::android::BuildInfo::GetInstance()->sdk_int() <
+ kAndroidJellyBeanApiLevel) {
+ parsed_command_line->AppendSwitch(switches::kDisableNotifications);
+ }
+
parsed_command_line->AppendSwitch(switches::kEnableViewportMeta);
parsed_command_line->AppendSwitch(
switches::kMainFrameResizesAreOrientationChanges);

Powered by Google App Engine
This is Rietveld 408576698