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

Unified Diff: runtime/bin/vmstats/server_access.dart

Issue 12377099: Added support for "bin-ified" vmstats web app source files (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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 | « runtime/bin/vmstats/packages/browser/dart.js ('k') | runtime/bin/vmstats/vmstats.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/vmstats/server_access.dart
===================================================================
--- runtime/bin/vmstats/server_access.dart (revision 0)
+++ runtime/bin/vmstats/server_access.dart (revision 0)
@@ -0,0 +1,19 @@
+part of vmstats;
+
+HttpRequest sendRequest(String url, var onSuccess, var onError) {
+ HttpRequest request = new HttpRequest();
sethladd1 2013/03/05 15:59:37 have you seen http://api.dartlang.org/docs/release
Tom Ball 2013/03/05 18:53:31 Looks very useful, but I can't find any way to get
+ request.onReadyStateChange.listen((HttpRequestProgressEvent event) {
+ if (request.readyState != 4) return;
+ if (request.status == 200) {
+ onSuccess(JSON.parse(request.responseText));
+ } else {
+ onError(request.status);
+ }
+ });
+ request.open("GET", url, true);
+ request.setRequestHeader("Content-Type", "text/plain;charset=UTF-8");
+ request.send();
+ return request;
+}
+
+
« no previous file with comments | « runtime/bin/vmstats/packages/browser/dart.js ('k') | runtime/bin/vmstats/vmstats.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698