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

Side by Side Diff: sdk/lib/io/platform.dart

Issue 123263003: Make the Platform.environment return value an unmodifiable map (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 6 years, 11 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/process_patch.dart ('k') | sdk/lib/io/platform_impl.dart » ('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 part of dart.io; 5 part of dart.io;
6 6
7 /** 7 /**
8 * The [Platform] class exposes details of the machine and operating 8 * The [Platform] class exposes details of the machine and operating
9 * system. 9 * system.
10 */ 10 */
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 static bool get isWindows => _operatingSystem == "windows"; 56 static bool get isWindows => _operatingSystem == "windows";
57 57
58 /** 58 /**
59 * Returns true if the operating system is Android. 59 * Returns true if the operating system is Android.
60 */ 60 */
61 static bool get isAndroid => _operatingSystem == "android"; 61 static bool get isAndroid => _operatingSystem == "android";
62 62
63 /** 63 /**
64 * Get the environment for this process. 64 * Get the environment for this process.
65 * 65 *
66 * The returned environment is a unmodifiable map which content is
67 * retrieved from the operating system on its first use.
68 *
66 * Environment variables on Windows are case-insensitive. The map 69 * Environment variables on Windows are case-insensitive. The map
67 * returned on Windows is therefore case-insensitive and will convert 70 * returned on Windows is therefore case-insensitive and will convert
68 * all keys to upper case. On other platforms the returned map is 71 * all keys to upper case. On other platforms the returned map is
69 * a standard case-sensitive map. 72 * a standard case-sensitive map.
70 */ 73 */
71 static Map<String, String> get environment => _Platform.environment; 74 static Map<String, String> get environment => _Platform.environment;
72 75
73 /** 76 /**
74 * Returns the path of the executable used to run the script in this 77 * Returns the path of the executable used to run the script in this
75 * isolate. 78 * isolate.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 * 115 *
113 * If there is no --package-root flag, then the empty string is returned. 116 * If there is no --package-root flag, then the empty string is returned.
114 */ 117 */
115 static String get packageRoot => _Platform.packageRoot; 118 static String get packageRoot => _Platform.packageRoot;
116 119
117 /** 120 /**
118 * Returns the version of the current Dart runtime. 121 * Returns the version of the current Dart runtime.
119 */ 122 */
120 static String get version => _version; 123 static String get version => _version;
121 } 124 }
OLDNEW
« no previous file with comments | « runtime/bin/process_patch.dart ('k') | sdk/lib/io/platform_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698