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

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

Issue 11770004: Rename Date to DateTime. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments and keep Backwards-compatibility class Date. Created 7 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_impl.dart ('k') | sdk/lib/io/http_utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_session.dart
diff --git a/sdk/lib/io/http_session.dart b/sdk/lib/io/http_session.dart
index 84eb08a8a57edd7f2bc8040b0a7f0375b215f726..b392297537834c76c2a6ce9636239bd0e5db347a 100644
--- a/sdk/lib/io/http_session.dart
+++ b/sdk/lib/io/http_session.dart
@@ -10,7 +10,7 @@ const String _DART_SESSION_ID = "DARTSESSID";
// the previous and next pointers.
class _HttpSession implements HttpSession {
_HttpSession(_HttpSessionManager this._sessionManager, String this.id)
- : _lastSeen = new Date.now();
+ : _lastSeen = new DateTime.now();
void destroy() {
_destroyed = true;
@@ -21,13 +21,13 @@ class _HttpSession implements HttpSession {
// Mark the session as seen. This will reset the timeout and move the node to
// the end of the timeout queue.
void _markSeen() {
- _lastSeen = new Date.now();
+ _lastSeen = new DateTime.now();
_sessionManager._bumpToEnd(this);
}
dynamic data;
- Date get lastSeen => _lastSeen;
+ DateTime get lastSeen => _lastSeen;
final String id;
@@ -37,7 +37,7 @@ class _HttpSession implements HttpSession {
// Destroyed marked. Used by the http connection to see if a session is valid.
bool _destroyed = false;
- Date _lastSeen;
+ DateTime _lastSeen;
Function _timeoutCallback;
_HttpSessionManager _sessionManager;
// Pointers in timeout queue.
@@ -138,7 +138,7 @@ class _HttpSessionManager {
void _startTimer() {
assert(_timer == null);
if (_head != null) {
- int seconds = new Date.now().difference(_head.lastSeen).inSeconds;
+ int seconds = new DateTime.now().difference(_head.lastSeen).inSeconds;
_timer = new Timer((_sessionTimeout - seconds) * 1000, _timerTimeout);
}
}
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | sdk/lib/io/http_utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698