summaryrefslogtreecommitdiffstats
path: root/base/sys_info.h
Commit message (Collapse)AuthorAgeFilesLines
* base: Move UI code out of SysInfo.derat@chromium.org2011-06-151-7/+0
| | | | | | | | | | | | | | | | This moves GetPrimaryDisplayDimensions() and DisplayCount() out of base and into a new DisplayUtils class (currently alongside the metrics code, since that's the only place that they're called). These methods add a GDK dependency that prevents Chrome OS from including process_util (which depends on SysInfo) in its libchrome library. BUG=chromium-os:16153 TEST=moved existing unit tests Review URL: http://codereview.chromium.org/7128001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89194 0039d316-1c4b-4281-b951-d872f2087c98
* Improve and unify Mac OS X run-time version checks.mark@chromium.org2011-06-141-0/+5
| | | | | | | | | | | | Don't use base::SysInfo::OperatingSystemVersionNumbers, because it calls Gestalt, which has a few bad properties. Introduce new functions that perform specific version checks. BUG=85972 TEST=base_unittests MacUtilTest.IsOSEllipsis Review URL: http://codereview.chromium.org/7144007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89028 0039d316-1c4b-4281-b951-d872f2087c98
* Make the windows_version.h functions threadsafe by using a singleton. Add ↵pkasting@chromium.org2011-04-071-6/+6
| | | | | | | | | | | | accessors to the singleton for more values that various code wants, then convert almost everyone using OSVERSIONINFO or SYSTEM_INFO structs to calling these accessors. Declare an AtExitManager in the out-of-process test runner since it didn't have one and that breaks singleton-using code in the test executable (as opposed to in chrome.dll). A few other minor cleanups along the way (binding of "*", shorter code, etc.). Because I ran into problems with it while modifying gcapi.cc, I cleaned up our usage of strsafe.h a bit, so that files that don't need it don't include it and files that do use STRSAFE_NO_DEPRECATE instead of a modified #include order. BUG=none TEST=none Review URL: http://codereview.chromium.org/6816027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80851 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 80819 due to failed testsmmenke@chromium.org2011-04-071-6/+6
| | | | | | | TBR=pkasting@chromium.org Review URL: http://codereview.chromium.org/6816024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80824 0039d316-1c4b-4281-b951-d872f2087c98
* Make the windows_version.h functions threadsafe by using a singleton. Add ↵pkasting@chromium.org2011-04-071-6/+6
| | | | | | | | | | | | accessors to the singleton for more values that various code wants, then convert almost everyone using OSVERSIONINFO or SYSTEM_INFO structs to calling these accessors. Declare an AtExitManager in the out-of-process test runner since it didn't have one and that breaks singleton-using code in the test executable (as opposed to in chrome.dll). A few other minor cleanups along the way (binding of "*", shorter code, etc.). Because I ran into problems with it while modifying gcapi.cc, I cleaned up our usage of strsafe.h a bit, so that files that don't need it don't include it and files that do use STRSAFE_NO_DEPRECATE instead of a modified #include order. BUG=none TEST=none Review URL: http://codereview.chromium.org/6713107 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80819 0039d316-1c4b-4281-b951-d872f2087c98
* Base: A few more files using BASE_API (for base.dll)rvargas@google.com2011-03-251-2/+3
| | | | | | | | BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6736019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79427 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* base: Get rid of the deprecated SysInfo::GetEnvVar.tfarina@chromium.org2010-07-081-5/+0
| | | | | | | | | | | Use the new EnvVarGetter::GetEnv instead. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/2876045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51829 0039d316-1c4b-4281-b951-d872f2087c98
* base: Get rid of the deprecated SysInfo::HasEnvVar.tfarina@chromium.org2010-07-051-4/+0
| | | | | | | | | | | Use the new EnvVarGetter::HasEnv instead. BUG=None TEST=trybots Review URL: http://codereview.chromium.org/2819042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51648 0039d316-1c4b-4281-b951-d872f2087c98
* Move EnvironmentVariableGetter from base/linux_util.h to base/env_var.h and ↵thestig@chromium.org2010-04-031-3/+3
| | | | | | | | | | rename it EnvVarGetter. Label base::SysInfo::{Get,Has}EnvVar as deprecated. BUG=none TEST=none Review URL: http://codereview.chromium.org/1606007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43559 0039d316-1c4b-4281-b951-d872f2087c98
* Changes to base/ from a combination of FreeBSD and OpenBSD patches.evan@chromium.org2009-12-291-1/+1
| | | | | | Review URL: http://codereview.chromium.org/495002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35321 0039d316-1c4b-4281-b951-d872f2087c98
* Convert SysInfo::AmountOfFreeDiskSpace from wstring to FilePath.tony@chromium.org2009-10-141-1/+3
| | | | | | | | BUG=24672 Review URL: http://codereview.chromium.org/276012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28927 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: don't try and read shmmax in the sandbox.agl@chromium.org2009-08-041-0/+5
| | | | | | | | | | | In the sandbox, reading shmmax from proc always fails. Thus, we move the function into base and call it before starting the sandbox. The value is then cached. http://codereview.chromium.org/159843 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22393 0039d316-1c4b-4281-b951-d872f2087c98
* Creating a unique user-agent string for ChromeOS builds, so that metrics can ↵evan@chromium.org2009-07-221-0/+13
| | | | | | | | | be aggregated separately from standard Chrome on Linux Review URL: http://codereview.chromium.org/155101 Patch from Chris Masone <cmasone@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21247 0039d316-1c4b-4281-b951-d872f2087c98
* We recently enabled reading sysctl values from inside the sandbox. This CL ↵jeremy@chromium.org2009-07-021-12/+0
| | | | | | | | removes workarounds needed when sysctl reads where blocked. Review URL: http://codereview.chromium.org/151202 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19809 0039d316-1c4b-4281-b951-d872f2087c98
* Recommit r10259 after successful try server run.jeremy@chromium.org2009-02-241-0/+11
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10265 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r10259 & subsequent fixes.jeremy@chromium.org2009-02-241-11/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10262 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for Sandboxed WebKit on OS X:jeremy@chromium.org2009-02-241-0/+11
| | | | | | | | | | * Cache Gestalt's value since it opens files. * Do a little cleanup in sys_info while I'm there and add a unit test. * Label some methods as not being threadsafe on OSX/POSIX. Review URL: http://codereview.chromium.org/27088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10259 0039d316-1c4b-4281-b951-d872f2087c98
* Under the OS X Sandbox, some system calls are blocked.jeremy@chromium.org2009-02-111-1/+9
| | | | | | | | This CL adds a facility to cache system info values on renderer startup. Review URL: http://codereview.chromium.org/20250 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9545 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Porting renderer/render_process.cc, low hanging fruitagl@chromium.org2009-01-221-0/+4
| | | | | | | Review URL: http://codereview.chromium.org/18622 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8436 0039d316-1c4b-4281-b951-d872f2087c98
* Refactoring for portability:mark@chromium.org2008-09-291-0/+25
| | | | | | | | | | | | | - Move chrome/common/env_util to base/sys_info - Move chrome/common/rand_util to base/rand_util (new), simplify its public interface, and fix its implementation Patch by Paweł Hajdan, Jr. <phajdan.jr@gmail.com> http://codereview.chromium.org/4079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2697 0039d316-1c4b-4281-b951-d872f2087c98
* Fix AmountOfFreeDiskSpace to be able to differentiate an errorrvargas@google.com2008-09-201-1/+2
| | | | | | | | from a full disk. Review URL: http://codereview.chromium.org/4003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2431 0039d316-1c4b-4281-b951-d872f2087c98
* Move GetFreeDiskSpace to SysInfo.deanm@chromium.org2008-09-181-0/+6
| | | | | | | Patch from Pawel Hajdan Jr. Review URL: http://codereview.chromium.org/3141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2359 0039d316-1c4b-4281-b951-d872f2087c98
* Add cross platform base::SysInfo::AmountOfPhysicalMemoryMB to replace the ↵deanm@chromium.org2008-09-181-0/+5
| | | | | | | | | Windows only env_util::GetPhysicalMemoryMB. From Seo Sanghyeon. Review URL: http://codereview.chromium.org/2962 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2358 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for querying the amount of memory on a system to sys_info.deanm@chromium.org2008-09-171-0/+5
| | | | | | Review URL: http://codereview.chromium.org/2927 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2303 0039d316-1c4b-4281-b951-d872f2087c98
* Add a class for extracting system-specific information, like the number of ↵deanm@chromium.org2008-09-171-0/+18
processors. Review URL: http://codereview.chromium.org/3084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2302 0039d316-1c4b-4281-b951-d872f2087c98