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

Unified Diff: pkg/oauth2/lib/src/credentials.dart

Issue 12379021: Make oauth2 warning-clean. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/oauth2/lib/src/credentials.dart
diff --git a/pkg/oauth2/lib/src/credentials.dart b/pkg/oauth2/lib/src/credentials.dart
index 26112c63a50a08f0ca75147bd6532af9ae632d4e..acc5690256e733c1e2584f6fb4d42b9b4b6879c0 100644
--- a/pkg/oauth2/lib/src/credentials.dart
+++ b/pkg/oauth2/lib/src/credentials.dart
@@ -50,7 +50,8 @@ class Credentials {
/// credentials will expire shortly after this is called. However, since the
/// client's expiration date is kept a few seconds earlier than the server's,
/// there should be enough leeway to rely on this.
- bool get isExpired => expiration != null && new DateTime.now() > expiration;
+ bool get isExpired => expiration != null &&
+ new DateTime.now().isAfter(expiration);
/// Whether it's possible to refresh these credentials.
bool get canRefresh => refreshToken != null && tokenEndpoint != null;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698