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

Side by Side Diff: pkg/intl/lib/src/lazy_locale_data.dart

Issue 16019002: Merge the dart:uri library into dart:core and update the Uri class (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Final cleanup Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/http/test/utils.dart ('k') | pkg/oauth2/lib/oauth2.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * This defines a class for loading locale data incrementally from 6 * This defines a class for loading locale data incrementally from
7 * an external source as JSON. The external sources expected are either 7 * an external source as JSON. The external sources expected are either
8 * local files or via HTTP request. 8 * local files or via HTTP request.
9 */ 9 */
10 10
11 library lazy_locale_data; 11 library lazy_locale_data;
12 import 'dart:async'; 12 import 'dart:async';
13 import 'dart:uri';
14 import 'intl_helpers.dart'; 13 import 'intl_helpers.dart';
15 import 'dart:json' as json; 14 import 'dart:json' as json;
16 15
17 /** 16 /**
18 * This implements the very basic map-type operations which are used 17 * This implements the very basic map-type operations which are used
19 * in locale lookup, and looks them up based on a URL that defines 18 * in locale lookup, and looks them up based on a URL that defines
20 * the external source. 19 * the external source.
21 */ 20 */
22 class LazyLocaleData { 21 class LazyLocaleData {
23 /// This holds the data we have loaded. 22 /// This holds the data we have loaded.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 104 }
106 105
107 /** 106 /**
108 * Given a Future [input] whose value is expected to be a string in JSON form, 107 * Given a Future [input] whose value is expected to be a string in JSON form,
109 * return another future that parses the JSON into a usable format. 108 * return another future that parses the JSON into a usable format.
110 */ 109 */
111 Future jsonData(Future input) { 110 Future jsonData(Future input) {
112 return input.then( (response) => json.parse(response)); 111 return input.then( (response) => json.parse(response));
113 } 112 }
114 } 113 }
OLDNEW
« no previous file with comments | « pkg/http/test/utils.dart ('k') | pkg/oauth2/lib/oauth2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698