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

Unified Diff: content/renderer/render_process_impl.cc

Issue 24210017: [Android] Set --optimize-for-size JavaScript flag for low-end devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync Created 7 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_process_impl.cc
diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc
index 20d181b26820fac540103530006d64798a4cffaa..bf972b137e8a1071ab87d16e6034a16ff4043cd6 100644
--- a/content/renderer/render_process_impl.cc
+++ b/content/renderer/render_process_impl.cc
@@ -36,6 +36,10 @@
#include "base/mac/mac_util.h"
#endif
+#if defined(OS_ANDROID)
+#include "base/android/sys_utils.h"
+#endif
+
namespace content {
RenderProcessImpl::RenderProcessImpl()
@@ -68,6 +72,11 @@ RenderProcessImpl::RenderProcessImpl()
// Out of process dev tools rely upon auto break behavior.
webkit_glue::SetJavaScriptFlags("--debugger-auto-break");
+#if defined(OS_ANDROID)
+ if (base::android::SysUtils::IsLowEndDevice())
+ webkit_glue::SetJavaScriptFlags("--optimize-for-size");
+#endif
+
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kJavaScriptFlags)) {
webkit_glue::SetJavaScriptFlags(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698