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

Side by Side Diff: base/sys_info.h

Issue 10038034: Implemented a "Last Updated" field for the about page of Chrome OS. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moved #include's inside #if defined(OS_CHROMEOS) Created 8 years, 8 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
« no previous file with comments | « no previous file | base/sys_info_chromeos.cc » ('j') | chrome/browser/ui/webui/help/help_handler.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #pragma once 7 #pragma once
8 8
9 #include "base/base_export.h" 9 #include "base/base_export.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/time.h"
11 12
12 #include <string> 13 #include <string>
13 14
14 class FilePath; 15 class FilePath;
15 16
16 namespace base { 17 namespace base {
17 18
18 class BASE_EXPORT SysInfo { 19 class BASE_EXPORT SysInfo {
James Hawkins 2012/04/13 03:36:17 Boo, this should really be a namespace :(
Kyle Horimoto 2012/04/13 18:12:38 I'll leave it as a class for this CL and redo it a
19 public: 20 public:
20 // Return the number of logical processors/cores on the current machine. 21 // Return the number of logical processors/cores on the current machine.
21 static int NumberOfProcessors(); 22 static int NumberOfProcessors();
22 23
23 // Return the number of bytes of physical memory on the current machine. 24 // Return the number of bytes of physical memory on the current machine.
24 static int64 AmountOfPhysicalMemory(); 25 static int64 AmountOfPhysicalMemory();
25 26
26 // Return the number of megabytes of physical memory on the current machine. 27 // Return the number of megabytes of physical memory on the current machine.
27 static int AmountOfPhysicalMemoryMB() { 28 static int AmountOfPhysicalMemoryMB() {
28 return static_cast<int>(AmountOfPhysicalMemory() / 1024 / 1024); 29 return static_cast<int>(AmountOfPhysicalMemory() / 1024 / 1024);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // Returns the name of the version entry we wish to look up in the 68 // Returns the name of the version entry we wish to look up in the
68 // Linux Standard Base release information file. 69 // Linux Standard Base release information file.
69 static std::string GetLinuxStandardBaseVersionKey(); 70 static std::string GetLinuxStandardBaseVersionKey();
70 71
71 // Parses /etc/lsb-release to get version information for Google Chrome OS. 72 // Parses /etc/lsb-release to get version information for Google Chrome OS.
72 // Declared here so it can be exposed for unit testing. 73 // Declared here so it can be exposed for unit testing.
73 static void ParseLsbRelease(const std::string& lsb_release, 74 static void ParseLsbRelease(const std::string& lsb_release,
74 int32* major_version, 75 int32* major_version,
75 int32* minor_version, 76 int32* minor_version,
76 int32* bugfix_version); 77 int32* bugfix_version);
78
79 // Retrieves the approximate time that Chrome OS was last updated. Each time
80 // a new build is created, /etc/lsb-release is modified with the new version
81 // numbers of the release. We return the time at which that file was last
James Hawkins 2012/04/13 03:36:17 nit: Don't use pronouns, e.g. 'we', in comments; p
Kyle Horimoto 2012/04/13 18:12:38 Done.
82 // modified, which is a close approximation to the time the last Chrome OS
83 // update occurred.
84 static bool GetTimeLastUpdated(base::Time* time);
James Hawkins 2012/04/13 03:36:17 nit: Document |time|.
Kyle Horimoto 2012/04/13 18:12:38 Done.
77 #endif 85 #endif
James Hawkins 2012/04/13 03:36:17 #endif // defined(OS_CHROMEOS)
Kyle Horimoto 2012/04/13 18:12:38 Done.
78 }; 86 };
79 87
80 } // namespace base 88 } // namespace base
81 89
82 #endif // BASE_SYS_INFO_H_ 90 #endif // BASE_SYS_INFO_H_
OLDNEW
« no previous file with comments | « no previous file | base/sys_info_chromeos.cc » ('j') | chrome/browser/ui/webui/help/help_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698