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

Side by Side Diff: sky/sdk/lib/framework/net/fetch.dart

Issue 1148963007: Fix a missing url_request mojom import in fetch.dart. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import '../shell.dart' as shell; 5 import '../shell.dart' as shell;
6 import 'dart:async'; 6 import 'dart:async';
7 import 'dart:sky' as sky; 7 import 'dart:sky' as sky;
8 import 'dart:typed_data'; 8 import 'dart:typed_data';
9 import 'package:mojo/core.dart' as core; 9 import 'package:mojo/core.dart' as core;
10 import 'package:mojom/mojo/network_service.mojom.dart'; 10 import 'package:mojom/mojo/network_service.mojom.dart';
11 import 'package:mojom/mojo/url_loader.mojom.dart'; 11 import 'package:mojom/mojo/url_loader.mojom.dart';
12 import 'package:mojom/mojo/url_request.mojom.dart';
12 13
13 class Response { 14 class Response {
14 ByteData body; 15 ByteData body;
15 16
16 Response(this.body); 17 Response(this.body);
17 18
18 String bodyAsString() { 19 String bodyAsString() {
19 return new String.fromCharCodes(new Uint8List.view(body.buffer)); 20 return new String.fromCharCodes(new Uint8List.view(body.buffer));
20 } 21 }
21 } 22 }
(...skipping 13 matching lines...) Expand all
35 var response = (await loader.ptr.start(request)).response; 36 var response = (await loader.ptr.start(request)).response;
36 37
37 loader.close(); 38 loader.close();
38 net.close(); 39 net.close();
39 40
40 if (response.body == null) return new Response(null); 41 if (response.body == null) return new Response(null);
41 42
42 ByteData data = await core.DataPipeDrainer.drainHandle(response.body); 43 ByteData data = await core.DataPipeDrainer.drainHandle(response.body);
43 return new Response(data); 44 return new Response(data);
44 } 45 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698