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

Unified Diff: base/sys_info.cc

Issue 1647803004: Move base to DEPS (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 11 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 | « base/sys_info.h ('k') | base/sys_info_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sys_info.cc
diff --git a/base/sys_info.cc b/base/sys_info.cc
deleted file mode 100644
index f24ebd3547d80e29f7aa1a60820c85ee4caf62b2..0000000000000000000000000000000000000000
--- a/base/sys_info.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/sys_info.h"
-
-#include "base/base_switches.h"
-#include "base/command_line.h"
-#include "base/lazy_instance.h"
-#include "base/metrics/field_trial.h"
-#include "base/strings/string_number_conversions.h"
-#include "base/strings/string_util.h"
-#include "base/sys_info_internal.h"
-#include "base/time/time.h"
-
-namespace base {
-
-#if !defined(OS_ANDROID)
-
-static const int kLowMemoryDeviceThresholdMB = 512;
-
-bool DetectLowEndDevice() {
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- if (command_line->HasSwitch(switches::kEnableLowEndDeviceMode))
- return true;
- if (command_line->HasSwitch(switches::kDisableLowEndDeviceMode))
- return false;
-
- int ram_size_mb = SysInfo::AmountOfPhysicalMemoryMB();
- return (ram_size_mb > 0 && ram_size_mb < kLowMemoryDeviceThresholdMB);
-}
-
-static LazyInstance<
- internal::LazySysInfoValue<bool, DetectLowEndDevice> >::Leaky
- g_lazy_low_end_device = LAZY_INSTANCE_INITIALIZER;
-
-// static
-bool SysInfo::IsLowEndDevice() {
- const std::string group_name =
- base::FieldTrialList::FindFullName("MemoryReduction");
-
- // Low End Device Mode will be enabled if this client is assigned to
- // one of those EnabledXXX groups.
- if (StartsWith(group_name, "Enabled", CompareCase::SENSITIVE))
- return true;
-
- return g_lazy_low_end_device.Get().value();
-}
-#endif
-
-#if (!defined(OS_MACOSX) || defined(OS_IOS)) && !defined(OS_ANDROID)
-std::string SysInfo::HardwareModelName() {
- return std::string();
-}
-#endif
-
-// static
-int64 SysInfo::Uptime() {
- // This code relies on an implementation detail of TimeTicks::Now() - that
- // its return value happens to coincide with the system uptime value in
- // microseconds, on Win/Mac/iOS/Linux/ChromeOS and Android.
- int64 uptime_in_microseconds = TimeTicks::Now().ToInternalValue();
- return uptime_in_microseconds / 1000;
-}
-
-} // namespace base
« no previous file with comments | « base/sys_info.h ('k') | base/sys_info_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698