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

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

Issue 22877005: Workaround for bug 11834 with Chrome XHR (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | « no previous file | pkg/pkg.status » ('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:async'; 12 import 'dart:async';
13 import 'dart:html'; 13 import 'dart:html';
14 import 'intl_helpers.dart'; 14 import 'intl_helpers.dart';
15 15
16 class HTTPRequestDataReader implements LocaleDataReader { 16 class HTTPRequestDataReader implements LocaleDataReader {
17 17
18 /** The base url from which we read the data. */ 18 /** The base url from which we read the data. */
19 String url; 19 String url;
20 HTTPRequestDataReader(this.url); 20 HTTPRequestDataReader(this.url);
21 21
22 Future read(String locale) => HttpRequest.getString('$url$locale.json'); 22 Future read(String locale) {
23 // TODO(alanknight): Remove this once it's not necessary for Chrome.
Emily Fortuna 2013/08/12 20:11:52 Can this include the issue number in the comment?
Alan Knight 2013/08/12 20:31:51 Argh. I did that, but I must have gotten the criti
24 // Without it, the tests will be flaky on Chrome.
25 var someNumber = new DateTime.now().millisecondsSinceEpoch;
26 return HttpRequest.getString('$url$locale.json?cacheBlocker=$someNumber');
27 }
23 } 28 }
OLDNEW
« no previous file with comments | « no previous file | pkg/pkg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698