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

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

Issue 124753002: Code cleanup (mostly io lib and some http lib). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/io/http.dart ('k') | sdk/lib/io/http_headers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_date.dart
diff --git a/sdk/lib/io/http_date.dart b/sdk/lib/io/http_date.dart
index 1fdd60903df44645a3005f99a22bde35e2b2d473..9720426d3cd268930d79a3d04ed5dbb955ec71b8 100644
--- a/sdk/lib/io/http_date.dart
+++ b/sdk/lib/io/http_date.dart
@@ -43,21 +43,21 @@ class HttpDate {
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
DateTime d = date.toUtc();
- StringBuffer sb = new StringBuffer();
- sb.write(wkday[d.weekday - 1]);
- sb.write(", ");
- sb.write(d.day.toString());
- sb.write(" ");
- sb.write(month[d.month - 1]);
- sb.write(" ");
- sb.write(d.year.toString());
- sb.write(d.hour < 9 ? " 0" : " ");
- sb.write(d.hour.toString());
- sb.write(d.minute < 9 ? ":0" : ":");
- sb.write(d.minute.toString());
- sb.write(d.second < 9 ? ":0" : ":");
- sb.write(d.second.toString());
- sb.write(" GMT");
+ StringBuffer sb = new StringBuffer()
Ivan Posva 2014/01/08 17:35:38 Lasse, Can you please explain the motivation of t
+ ..write(wkday[d.weekday - 1])
+ ..write(", ")
+ ..write(d.day.toString())
+ ..write(" ")
+ ..write(month[d.month - 1])
+ ..write(" ")
+ ..write(d.year.toString())
+ ..write(d.hour < 9 ? " 0" : " ")
+ ..write(d.hour.toString())
+ ..write(d.minute < 9 ? ":0" : ":")
+ ..write(d.minute.toString())
+ ..write(d.second < 9 ? ":0" : ":")
+ ..write(d.second.toString())
+ ..write(" GMT");
return sb.toString();
}
@@ -215,9 +215,7 @@ class HttpDate {
throw new HttpException("Invalid cookie date $date");
}
- bool isEnd() {
- return position == date.length;
- }
+ bool isEnd() => position == date.length;
bool isDelimiter(String s) {
int char = s.codeUnitAt(0);
« no previous file with comments | « sdk/lib/io/http.dart ('k') | sdk/lib/io/http_headers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698