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

Unified Diff: content/renderer/render_process_impl.cc

Issue 258663002: Expose a low-end device mode override flags for non-android OSs as well (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comments. Created 6 years, 6 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 | « content/renderer/gpu/render_widget_compositor.cc ('k') | content/renderer/render_widget.cc » ('j') | 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 c05a19e2134764e74e95a0764bd1f90bf03345cd..421e60bcf9661736327ea97127ed5d8dbd4a1c6b 100644
--- a/content/renderer/render_process_impl.cc
+++ b/content/renderer/render_process_impl.cc
@@ -15,16 +15,13 @@
#include "base/basictypes.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
+#include "base/sys_info.h"
#include "content/child/site_isolation_policy.h"
#include "content/public/common/content_switches.h"
#include "content/public/renderer/content_renderer_client.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "v8/include/v8.h"
-#if defined(OS_ANDROID)
-#include "base/android/sys_utils.h"
-#endif
-
namespace content {
RenderProcessImpl::RenderProcessImpl()
@@ -46,13 +43,11 @@ RenderProcessImpl::RenderProcessImpl()
}
#endif
-#if defined(OS_ANDROID)
- if (base::android::SysUtils::IsLowEndDevice()) {
+ if (base::SysInfo::IsLowEndDevice()) {
std::string optimize_flag("--optimize-for-size");
v8::V8::SetFlagsFromString(optimize_flag.c_str(),
static_cast<int>(optimize_flag.size()));
}
-#endif
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kJavaScriptFlags)) {
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | content/renderer/render_widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698