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

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

Issue 11233061: Revert "Parts must start with 'part of'" and "Attempt to fix VM build" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 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 | « dart/pkg/intl/lib/src/file_data_reader.dart ('k') | dart/pkg/intl/lib/src/intl_helpers.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 contains a reader that accesses data using the HttpRequest 6 * This contains a reader that accesses data using the HttpRequest
7 * facility, and thus works only in the web browser. 7 * facility, and thus works only in the web browser.
8 */ 8 */
9 9
10 library http_request_data_reader; 10 #library('http_request_data_reader');
11 11
12 import 'dart:html'; 12 #import('dart:html');
13 import 'intl_helpers.dart'; 13 #import('intl_helpers.dart');
14 14
15 class HTTPRequestDataReader implements LocaleDataReader { 15 class HTTPRequestDataReader implements LocaleDataReader {
16 16
17 /** The base url from which we read the data. */ 17 /** The base url from which we read the data. */
18 String url; 18 String url;
19 HTTPRequestDataReader(this.url); 19 HTTPRequestDataReader(this.url);
20 20
21 Future read(String locale) { 21 Future read(String locale) {
22 var completer = new Completer(); 22 var completer = new Completer();
23 var source = '$url$locale.json'; 23 var source = '$url$locale.json';
24 var request = new HttpRequest.get( 24 var request = new HttpRequest.get(
25 source, 25 source,
26 (request) => completer.complete(request.responseText)); 26 (request) => completer.complete(request.responseText));
27 return completer.future; 27 return completer.future;
28 } 28 }
29 } 29 }
OLDNEW
« no previous file with comments | « dart/pkg/intl/lib/src/file_data_reader.dart ('k') | dart/pkg/intl/lib/src/intl_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698