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

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

Issue 22565003: Make the values of Platform.executable and Platform.script available to all isolates (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 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
(...skipping 16 matching lines...) Expand all
27 // Extracts the local hostname. 27 // Extracts the local hostname.
28 static bool LocalHostname(char* buffer, intptr_t buffer_length); 28 static bool LocalHostname(char* buffer, intptr_t buffer_length);
29 29
30 // Extracts the environment variables for the current process. The 30 // Extracts the environment variables for the current process. The
31 // array of strings returned must be deallocated using 31 // array of strings returned must be deallocated using
32 // FreeEnvironment. The number of elements in the array is returned 32 // FreeEnvironment. The number of elements in the array is returned
33 // in the count argument. 33 // in the count argument.
34 static char** Environment(intptr_t* count); 34 static char** Environment(intptr_t* count);
35 static void FreeEnvironment(char** env, intptr_t count); 35 static void FreeEnvironment(char** env, intptr_t count);
36 36
37 // Stores and gets the executable name.
38 static void SetExecutableName(char* executable_name) {
39 executable_name_ = executable_name;
40 }
41 static char* GetExecutableName() {
Bill Hesse 2013/08/07 13:39:44 Could these all be const char*?
Søren Gjesse 2013/08/07 14:37:46 Done.
42 return executable_name_;
43 }
44
37 private: 45 private:
46 static char* executable_name_;
47
38 DISALLOW_ALLOCATION(); 48 DISALLOW_ALLOCATION();
39 DISALLOW_IMPLICIT_CONSTRUCTORS(Platform); 49 DISALLOW_IMPLICIT_CONSTRUCTORS(Platform);
40 }; 50 };
41 51
42 } // namespace bin 52 } // namespace bin
43 } // namespace dart 53 } // namespace dart
44 54
45 #endif // BIN_PLATFORM_H_ 55 #endif // BIN_PLATFORM_H_
OLDNEW
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/bin/platform.cc » ('j') | sdk/lib/io/platform_impl.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698