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

Side by Side Diff: sdk/lib/_internal/pub/asset/dart/serialize/transformer.dart

Issue 298683003: Use shelf in pub's barback and admin servers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 6 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 | sdk/lib/_internal/pub/lib/src/barback/admin_server.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library pub.asset.serialize.transformer; 5 library pub.asset.serialize.transformer;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:isolate'; 8 import 'dart:isolate';
9 9
10 import 'package:barback/barback.dart'; 10 import 'package:barback/barback.dart';
11 11
12 import '../serialize.dart'; 12 import '../serialize.dart';
13 import '../utils.dart';
14 import 'transform.dart'; 13 import 'transform.dart';
15 14
16 /// Converts [transformer] into a serializable map. 15 /// Converts [transformer] into a serializable map.
17 Map _serializeTransformer(Transformer transformer) { 16 Map _serializeTransformer(Transformer transformer) {
18 var port = new ReceivePort(); 17 var port = new ReceivePort();
19 port.listen((wrappedMessage) { 18 port.listen((wrappedMessage) {
20 respond(wrappedMessage, (message) { 19 respond(wrappedMessage, (message) {
21 if (message['type'] == 'isPrimary') { 20 if (message['type'] == 'isPrimary') {
22 return transformer.isPrimary(deserializeId(message['id'])); 21 return transformer.isPrimary(deserializeId(message['id']));
23 } else if (message['type'] == 'declareOutputs') { 22 } else if (message['type'] == 'declareOutputs') {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 65
67 /// Converts [transformerOrGroup] into a serializable map. 66 /// Converts [transformerOrGroup] into a serializable map.
68 Map serializeTransformerOrGroup(transformerOrGroup) { 67 Map serializeTransformerOrGroup(transformerOrGroup) {
69 if (transformerOrGroup is Transformer) { 68 if (transformerOrGroup is Transformer) {
70 return _serializeTransformer(transformerOrGroup); 69 return _serializeTransformer(transformerOrGroup);
71 } else { 70 } else {
72 assert(transformerOrGroup is TransformerGroup); 71 assert(transformerOrGroup is TransformerGroup);
73 return _serializeTransformerGroup(transformerOrGroup); 72 return _serializeTransformerGroup(transformerOrGroup);
74 } 73 }
75 } 74 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/barback/admin_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698