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

Unified Diff: pkg/intl/lib/src/http_request_data_reader.dart

Issue 12148002: Resubmit "Adding ease-of-use methods to HttpRequest." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « no previous file | sdk/lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/src/http_request_data_reader.dart
diff --git a/pkg/intl/lib/src/http_request_data_reader.dart b/pkg/intl/lib/src/http_request_data_reader.dart
index 6cf14c7126d01d28e6b9f2a7414b648ed988311f..530dce6d2553e30ae5d8ddd53dd4c1ba7f7fdb8d 100644
--- a/pkg/intl/lib/src/http_request_data_reader.dart
+++ b/pkg/intl/lib/src/http_request_data_reader.dart
@@ -19,12 +19,5 @@ class HTTPRequestDataReader implements LocaleDataReader {
String url;
HTTPRequestDataReader(this.url);
- Future read(String locale) {
- var completer = new Completer();
- var source = '$url$locale.json';
- var request = new HttpRequest.get(
- source,
- (req) => completer.complete(req.responseText));
- return completer.future;
- }
+ Future read(String locale) => HttpRequest.getString('$url$locale.json');
}
« no previous file with comments | « no previous file | sdk/lib/html/dart2js/html_dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698