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

Unified Diff: sdk/lib/io/platform_impl.dart

Issue 2754013002: Format all dart: library files (Closed)
Patch Set: Format all dart: library files Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/io/platform.dart ('k') | sdk/lib/io/process.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/platform_impl.dart
diff --git a/sdk/lib/io/platform_impl.dart b/sdk/lib/io/platform_impl.dart
index f7637f17cacbbfe0145e60b060ca42d515066122..98ad5c1816dfd4987744e5c3289b9d043c9b180b 100644
--- a/sdk/lib/io/platform_impl.dart
+++ b/sdk/lib/io/platform_impl.dart
@@ -41,7 +41,7 @@ class _Platform {
// Cache the OS environment. This can be an OSError instance if
// retrieving the environment failed.
- static var/*OSError|Map<String,String>*/ _environmentCache;
+ static var /*OSError|Map<String,String>*/ _environmentCache;
static int get numberOfProcessors => _numberOfProcessors();
static String get pathSeparator => _pathSeparator();
@@ -63,7 +63,7 @@ class _Platform {
static Map<String, String> get environment {
if (_environmentCache == null) {
var env = _environment();
- if (env is !OSError) {
+ if (env is! OSError) {
var isWindows = operatingSystem == 'windows';
var result = isWindows
? new _CaseInsensitiveStringMap<String>()
@@ -111,15 +111,24 @@ class _CaseInsensitiveStringMap<V> implements Map<String, V> {
void operator []=(String key, V value) {
_map[key.toUpperCase()] = value;
}
+
V putIfAbsent(String key, V ifAbsent()) {
return _map.putIfAbsent(key.toUpperCase(), ifAbsent);
}
+
void addAll(Map<String, V> other) {
other.forEach((key, value) => this[key.toUpperCase()] = value);
}
+
V remove(Object key) => key is String ? _map.remove(key.toUpperCase()) : null;
- void clear() { _map.clear(); }
- void forEach(void f(String key, V value)) { _map.forEach(f); }
+ void clear() {
+ _map.clear();
+ }
+
+ void forEach(void f(String key, V value)) {
+ _map.forEach(f);
+ }
+
Iterable<String> get keys => _map.keys;
Iterable<V> get values => _map.values;
int get length => _map.length;
« no previous file with comments | « sdk/lib/io/platform.dart ('k') | sdk/lib/io/process.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698