Change fromString constructor to parse static method
on HeaderValue and ContentType.
R=ajohnsen@google.com
BUG=
Review URL: https://codereview.chromium.org//14914002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22406 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/lib/src/handle_access_token_response.dart b/lib/src/handle_access_token_response.dart
index 65e706e..c82c818 100644
--- a/lib/src/handle_access_token_response.dart
+++ b/lib/src/handle_access_token_response.dart
@@ -33,7 +33,7 @@
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 @@
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"');