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

Side by Side Diff: runtime/bin/builtin.dart

Issue 23686021: Add property base to the Uri class (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed more review comments Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/bin/dartutils.cc » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 builtin; 5 library builtin;
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 // Corelib 'print' implementation. 8 // Corelib 'print' implementation.
9 void _print(arg) { 9 void _print(arg) {
10 _Logger._printString(arg.toString()); 10 _Logger._printString(arg.toString());
11 } 11 }
12 12
13 13
14 class _Logger { 14 class _Logger {
15 static void _printString(String s) native "Logger_PrintString"; 15 static void _printString(String s) native "Logger_PrintString";
16 } 16 }
17 17
18 18
19 _getPrintClosure() => _print; 19 _getPrintClosure() => _print;
20 20
21 21
22 void _logResolution(String msg) { 22 void _logResolution(String msg) {
23 final enabled = false; 23 final enabled = false;
24 if (enabled) { 24 if (enabled) {
25 _Logger._printString(msg); 25 _Logger._printString(msg);
26 } 26 }
27 } 27 }
28 28
29 29
30 // Corelib 'Uri.base' implementation.
31 Uri _uriBase() {
32 return new Uri.file(Directory.current.path + "/");
33 }
34
35 _getUriBaseClosure() => _uriBase;
36
37
30 var _httpRequestResponseCode = 0; 38 var _httpRequestResponseCode = 0;
31 var _httpRequestStatusString; 39 var _httpRequestStatusString;
32 var _httpRequestResponse; 40 var _httpRequestResponse;
33 41
34 _getHttpRequestResponseCode() => _httpRequestResponseCode; 42 _getHttpRequestResponseCode() => _httpRequestResponseCode;
35 _getHttpRequestStatusString() => _httpRequestStatusString; 43 _getHttpRequestStatusString() => _httpRequestStatusString;
36 _getHttpRequestResponse() => _httpRequestResponse; 44 _getHttpRequestResponse() => _httpRequestResponse;
37 45
38 void _requestCompleted(List<int> data, HttpClientResponse response) { 46 void _requestCompleted(List<int> data, HttpClientResponse response) {
39 _httpRequestResponseCode = response.statusCode; 47 _httpRequestResponseCode = response.statusCode;
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 } 303 }
296 _logResolution('# Package: $uri -> $path'); 304 _logResolution('# Package: $uri -> $path');
297 return path; 305 return path;
298 } 306 }
299 307
300 308
301 String _filePathFromHttpUri(Uri uri) { 309 String _filePathFromHttpUri(Uri uri) {
302 _logResolution('# Path: $uri -> $uri'); 310 _logResolution('# Path: $uri -> $uri');
303 return uri.toString(); 311 return uri.toString();
304 } 312 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/dartutils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698