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

Unified Diff: utils/pub/io.dart

Issue 11312203: "Reverting 14829-14832" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | « utils/pub/git_source.dart ('k') | utils/pub/version.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/io.dart
diff --git a/utils/pub/io.dart b/utils/pub/io.dart
index 3c8269396148bd8ee76955623be6c49bee5d0761..e89bf956f90a71bfa2c60e462eb455a32871107e 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -21,7 +21,7 @@ String _gitCommandCache;
/** Gets the current working directory. */
String get currentWorkingDir => new File('.').fullPathSync();
-final NEWLINE_PATTERN = new RegExp("\r\n?|\n\r?");
+const Pattern NEWLINE_PATTERN = const RegExp("\r\n?|\n\r?");
/**
* Prints the given string to `stderr` on its own line.
@@ -382,7 +382,7 @@ String getFullPath(entry) {
if (Platform.operatingSystem == 'windows') {
// An absolute path on Windows is either UNC (two leading backslashes),
// or a drive letter followed by a colon and a slash.
- var ABSOLUTE = new RegExp(r'^(\\\\|[a-zA-Z]:[/\\])');
+ const ABSOLUTE = const RegExp(r'^(\\\\|[a-zA-Z]:[/\\])');
if (ABSOLUTE.hasMatch(path)) return path;
} else {
if (path.startsWith('/')) return path;
« no previous file with comments | « utils/pub/git_source.dart ('k') | utils/pub/version.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698