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

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

Issue 11783009: Big merge from experimental to bleeding edge. (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 | « pkg/intl/lib/src/intl_helpers.dart ('k') | pkg/intl/test/date_time_format_file_test_stub.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/intl/lib/src/lazy_locale_data.dart
diff --git a/pkg/intl/lib/src/lazy_locale_data.dart b/pkg/intl/lib/src/lazy_locale_data.dart
index 66acbdf550b71980d292cb71b206775e3ee82d1a..a7ec331949b1fcc79d61403448a04161522772f5 100644
--- a/pkg/intl/lib/src/lazy_locale_data.dart
+++ b/pkg/intl/lib/src/lazy_locale_data.dart
@@ -9,9 +9,10 @@
*/
library lazy_locale_data;
+import 'dart:async';
import 'dart:uri';
import 'intl_helpers.dart';
-import 'dart:json';
+import 'dart:json' as json;
/**
* This implements the very basic map-type operations which are used
@@ -99,7 +100,7 @@ class LazyLocaleData {
*/
Future initLocale(String localeName) {
var data = _reader.read(localeName);
- return jsonData(data).transform( (input) {
+ return jsonData(data).then( (input) {
map[localeName] = _creationFunction(input);});
}
@@ -108,6 +109,6 @@ class LazyLocaleData {
* return another future that parses the JSON into a usable format.
*/
Future jsonData(Future input) {
- return input.transform( (response) => JSON.parse(response));
+ return input.then( (response) => json.parse(response));
}
-}
+}
« no previous file with comments | « pkg/intl/lib/src/intl_helpers.dart ('k') | pkg/intl/test/date_time_format_file_test_stub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698