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

Unified Diff: sdk/lib/vmservice/vmservice.dart

Issue 2225583002: Support devFS writes via HTTP PUT (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rmacnak review Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/vmservice/message.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/vmservice/vmservice.dart
diff --git a/sdk/lib/vmservice/vmservice.dart b/sdk/lib/vmservice/vmservice.dart
index df5642b520091619d2534ca8042fe498d5cfc1b2..25ceb6a5a85290b9cafe5758fabe4b6dd9f23728 100644
--- a/sdk/lib/vmservice/vmservice.dart
+++ b/sdk/lib/vmservice/vmservice.dart
@@ -116,6 +116,9 @@ typedef Future DeleteDirCallback(Uri path);
/// Called to write a file.
typedef Future WriteFileCallback(Uri path, List<int> bytes);
+/// Called to write a stream into a file.
+typedef Future WriteStreamFileCallback(Uri path, Stream<List<int>> bytes);
+
/// Called to read a file.
typedef Future<List<int>> ReadFileCallback(Uri path);
@@ -130,6 +133,7 @@ class VMServiceEmbedderHooks {
static CreateTempDirCallback createTempDir;
static DeleteDirCallback deleteDir;
static WriteFileCallback writeFile;
+ static WriteStreamFileCallback writeStreamFile;
static ReadFileCallback readFile;
static ListFilesCallback listFiles;
}
@@ -146,7 +150,7 @@ class VMService extends MessageRouter {
/// A port used to receive events from the VM.
final RawReceivePort eventPort;
- final _devfs = new DevFS();
+ final devfs = new DevFS();
void _addClient(Client client) {
assert(client.streams.isEmpty);
@@ -206,7 +210,7 @@ class VMService extends MessageRouter {
for (var client in clientsList) {
client.disconnect();
}
- _devfs.cleanup();
+ devfs.cleanup();
if (VMServiceEmbedderHooks.cleanup != null) {
await VMServiceEmbedderHooks.cleanup();
}
@@ -401,8 +405,8 @@ class VMService extends MessageRouter {
if (message.method == '_spawnUri') {
return _spawnUri(message);
}
- if (_devfs.shouldHandleMessage(message)) {
- return _devfs.handleMessage(message);
+ if (devfs.shouldHandleMessage(message)) {
+ return devfs.handleMessage(message);
}
if (message.params['isolateId'] != null) {
return runningIsolates.route(message);
« no previous file with comments | « sdk/lib/vmservice/message.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698