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

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

Issue 14914002: Change fromString constructor to parse static method (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed additional tests Created 7 years, 7 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 | « pkg/http/test/multipart_test.dart ('k') | sdk/lib/_internal/pub/lib/src/http.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/oauth2/lib/src/handle_access_token_response.dart
diff --git a/pkg/oauth2/lib/src/handle_access_token_response.dart b/pkg/oauth2/lib/src/handle_access_token_response.dart
index 65e706e6a608514fcfa7dde4038512848c1c3d8e..c82c818ab7f936c65bef5a8df71024cd9947c99e 100644
--- a/pkg/oauth2/lib/src/handle_access_token_response.dart
+++ b/pkg/oauth2/lib/src/handle_access_token_response.dart
@@ -33,7 +33,7 @@ Credentials handleAccessTokenResponse(
var contentType = response.headers['content-type'];
if (contentType != null) {
- contentType = new ContentType.fromString(contentType);
+ contentType = ContentType.parse(contentType);
}
validate(contentType != null && contentType.value == "application/json",
'content-type was "$contentType", expected "application/json"');
@@ -103,7 +103,7 @@ void _handleErrorResponse(http.Response response, Uri tokenEndpoint) {
var contentType = response.headers['content-type'];
if (contentType != null) {
- contentType = new ContentType.fromString(contentType);
+ contentType = ContentType.parse(contentType);
}
validate(contentType != null && contentType.value == "application/json",
'content-type was "$contentType", expected "application/json"');
« no previous file with comments | « pkg/http/test/multipart_test.dart ('k') | sdk/lib/_internal/pub/lib/src/http.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698