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

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

Issue 584023004: Service isolate rework (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
27 // Extracts the local hostname. 32 // Extracts the local hostname.
28 static bool LocalHostname(char* buffer, intptr_t buffer_length); 33 static bool LocalHostname(char* buffer, intptr_t buffer_length);
29 34
30 // Extracts the environment variables for the current process. The 35 // Extracts the environment variables for the current process. The
31 // array of strings returned must be deallocated using 36 // array of strings returned must be deallocated using
32 // FreeEnvironment. The number of elements in the array is returned 37 // FreeEnvironment. The number of elements in the array is returned
33 // in the count argument. 38 // in the count argument.
34 static char** Environment(intptr_t* count); 39 static char** Environment(intptr_t* count);
35 static void FreeEnvironment(char** env, intptr_t count); 40 static void FreeEnvironment(char** env, intptr_t count);
36 41
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 static char** argv_; // VM flags are argv_[1 ... script_index_ - 1] 74 static char** argv_; // VM flags are argv_[1 ... script_index_ - 1]
70 75
71 DISALLOW_ALLOCATION(); 76 DISALLOW_ALLOCATION();
72 DISALLOW_IMPLICIT_CONSTRUCTORS(Platform); 77 DISALLOW_IMPLICIT_CONSTRUCTORS(Platform);
73 }; 78 };
74 79
75 } // namespace bin 80 } // namespace bin
76 } // namespace dart 81 } // namespace dart
77 82
78 #endif // BIN_PLATFORM_H_ 83 #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