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

Unified Diff: samples/leap/request_cache.dart

Issue 11085017: Move leap to lib/compiler/samples. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/leap/leap_server.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/leap/request_cache.dart
===================================================================
--- samples/leap/request_cache.dart (revision 13412)
+++ samples/leap/request_cache.dart (working copy)
@@ -1,27 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#library('request_cache');
-
-#import('dart:html');
-
-/** File system implementation using HTML5's Web Storage. */
-class HttpRequestCache {
- final Storage storage;
-
- HttpRequestCache() : storage = window.sessionStorage;
-
- String readAll(String filename) {
- String response = storage[filename];
-
- if (response == null) {
- HttpRequest xr = new HttpRequest();
- xr.open("GET", filename, false);
- xr.send();
- response = xr.responseText;
- storage[filename] = response;
- }
- return response;
- }
-}
« no previous file with comments | « samples/leap/leap_server.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698