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

Side by Side Diff: base/sys_info.h

Issue 3141: Move GetFreeDiskSpace to SysInfo. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | base/sys_info_posix.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_SYS_INFO_H_ 5 #ifndef BASE_SYS_INFO_H_
6 #define BASE_SYS_INFO_H_ 6 #define BASE_SYS_INFO_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 9
10 #include <string>
11
10 namespace base { 12 namespace base {
11 13
12 class SysInfo { 14 class SysInfo {
13 public: 15 public:
14 // Return the number of logical processors/cores on the current machine. 16 // Return the number of logical processors/cores on the current machine.
15 static int NumberOfProcessors(); 17 static int NumberOfProcessors();
16 18
17 // Return the number of bytes of physical memory on the current machine. 19 // Return the number of bytes of physical memory on the current machine.
18 static int64 AmountOfPhysicalMemory(); 20 static int64 AmountOfPhysicalMemory();
19 21
20 // Return the number of megabytes of physical memory on the current machine. 22 // Return the number of megabytes of physical memory on the current machine.
21 static int AmountOfPhysicalMemoryMB() { 23 static int AmountOfPhysicalMemoryMB() {
22 return static_cast<int>(AmountOfPhysicalMemory() / 1024 / 1024); 24 return static_cast<int>(AmountOfPhysicalMemory() / 1024 / 1024);
23 } 25 }
26
27 // Return the available disk space in bytes on the volume containing |path|.
28 static int64 AmountOfFreeDiskSpace(const std::wstring& path);
29
24 }; 30 };
25 31
26 } // namespace base 32 } // namespace base
27 33
28 #endif // BASE_SYS_INFO_H_ 34 #endif // BASE_SYS_INFO_H_
OLDNEW
« no previous file with comments | « no previous file | base/sys_info_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698