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

Side by Side Diff: runtime/bin/platform.h

Issue 867113003: Revert r43217, r43215, r43208, r43207, and r43202. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/bin/platform_android.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef BIN_PLATFORM_H_ 5 #ifndef BIN_PLATFORM_H_
6 #define BIN_PLATFORM_H_ 6 #define BIN_PLATFORM_H_
7 7
8 #include "bin/builtin.h" 8 #include "bin/builtin.h"
9 9
10 10
11 namespace dart { 11 namespace dart {
12 namespace bin { 12 namespace bin {
13 13
14 class Platform { 14 class Platform {
15 public: 15 public:
16 // Perform platform specific initialization. 16 // Perform platform specific initialization.
17 static bool Initialize(); 17 static bool Initialize();
18 18
19 // Returns the number of processors on the machine. 19 // Returns the number of processors on the machine.
20 static int NumberOfProcessors(); 20 static int NumberOfProcessors();
21 21
22 // Returns a string representing the operating system ("linux", 22 // Returns a string representing the operating system ("linux",
23 // "macos" or "windows"). The returned string should not be 23 // "macos" or "windows"). The returned string should not be
24 // deallocated by the caller. 24 // deallocated by the caller.
25 static const char* OperatingSystem(); 25 static const char* OperatingSystem();
26 26
27 // Returns a string representing the operating system's shared library
28 // extension (e.g. 'so', 'dll', ...). The returned string should not be
29 // deallocated by the caller.
30 static const char* LibraryExtension();
31
32 // Extracts the local hostname. 27 // Extracts the local hostname.
33 static bool LocalHostname(char* buffer, intptr_t buffer_length); 28 static bool LocalHostname(char* buffer, intptr_t buffer_length);
34 29
35 // Extracts the environment variables for the current process. The 30 // Extracts the environment variables for the current process. The
36 // array of strings returned must be deallocated using 31 // array of strings returned must be deallocated using
37 // FreeEnvironment. The number of elements in the array is returned 32 // FreeEnvironment. The number of elements in the array is returned
38 // in the count argument. 33 // in the count argument.
39 static char** Environment(intptr_t* count); 34 static char** Environment(intptr_t* count);
40 static void FreeEnvironment(char** env, intptr_t count); 35 static void FreeEnvironment(char** env, intptr_t count);
41 36
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 static char** argv_; // VM flags are argv_[1 ... script_index_ - 1] 69 static char** argv_; // VM flags are argv_[1 ... script_index_ - 1]
75 70
76 DISALLOW_ALLOCATION(); 71 DISALLOW_ALLOCATION();
77 DISALLOW_IMPLICIT_CONSTRUCTORS(Platform); 72 DISALLOW_IMPLICIT_CONSTRUCTORS(Platform);
78 }; 73 };
79 74
80 } // namespace bin 75 } // namespace bin
81 } // namespace dart 76 } // namespace dart
82 77
83 #endif // BIN_PLATFORM_H_ 78 #endif // BIN_PLATFORM_H_
OLDNEW
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/bin/platform_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698