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

Side by Side Diff: base/sys_info.h

Issue 12212010: Truncate the download file name if it exceeds the filesystem limit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add Windows (UTF-16) support. Created 7 years, 10 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 8 #include <string>
9 9
10 #include "base/base_export.h" 10 #include "base/base_export.h"
(...skipping 17 matching lines...) Expand all
28 28
29 // Return the number of megabytes of physical memory on the current machine. 29 // Return the number of megabytes of physical memory on the current machine.
30 static int AmountOfPhysicalMemoryMB() { 30 static int AmountOfPhysicalMemoryMB() {
31 return static_cast<int>(AmountOfPhysicalMemory() / 1024 / 1024); 31 return static_cast<int>(AmountOfPhysicalMemory() / 1024 / 1024);
32 } 32 }
33 33
34 // Return the available disk space in bytes on the volume containing |path|, 34 // Return the available disk space in bytes on the volume containing |path|,
35 // or -1 on failure. 35 // or -1 on failure.
36 static int64 AmountOfFreeDiskSpace(const FilePath& path); 36 static int64 AmountOfFreeDiskSpace(const FilePath& path);
37 37
38 // Return the maximum length of path component on the volume containing
39 // |path|, in the number of FilePath::CharType, or -1 on failure.
40 static int GetMaximumPathComponentLength(const FilePath& path);
asanka 2013/02/12 20:20:12 Why in sys_info.h? Have you considered putting thi
kinaba 2013/02/14 04:52:47 Fm, sounds better. Done.
41
38 // Returns system uptime in milliseconds. 42 // Returns system uptime in milliseconds.
39 static int64 Uptime(); 43 static int64 Uptime();
40 44
41 // Returns the name of the host operating system. 45 // Returns the name of the host operating system.
42 static std::string OperatingSystemName(); 46 static std::string OperatingSystemName();
43 47
44 // Returns the version of the host operating system. 48 // Returns the version of the host operating system.
45 static std::string OperatingSystemVersion(); 49 static std::string OperatingSystemVersion();
46 50
47 // Retrieves detailed numeric values for the OS version. 51 // Retrieves detailed numeric values for the OS version.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // Returns the device's name. 107 // Returns the device's name.
104 static std::string GetDeviceName(); 108 static std::string GetDeviceName();
105 109
106 static int DalvikHeapSizeMB(); 110 static int DalvikHeapSizeMB();
107 #endif // defined(OS_ANDROID) 111 #endif // defined(OS_ANDROID)
108 }; 112 };
109 113
110 } // namespace base 114 } // namespace base
111 115
112 #endif // BASE_SYS_INFO_H_ 116 #endif // BASE_SYS_INFO_H_
OLDNEW
« no previous file with comments | « no previous file | base/sys_info_posix.cc » ('j') | chrome/browser/download/download_path_reservation_tracker.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698