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

Unified Diff: runtime/bin/builtin.dart

Issue 550003004: - Support loading from https. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 3 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 | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/builtin.dart
===================================================================
--- runtime/bin/builtin.dart (revision 40004)
+++ runtime/bin/builtin.dart (working copy)
@@ -163,7 +163,7 @@
}
-// Returns either a file path or a URI starting with http:, as a String.
+// Returns either a file path or a URI starting with http[s]:, as a String.
String _filePathFromUri(String userUri) {
var uri = Uri.parse(userUri);
if (_logBuiltin) {
@@ -178,6 +178,7 @@
case 'package':
return _filePathFromUri(_resolvePackageUri(uri).toString());
case 'http':
+ case 'https':
return uri.toString();
default:
// Only handling file, http, and package URIs
@@ -301,11 +302,12 @@
case '':
case 'file':
case 'http':
+ case 'https':
return uri;
case 'package':
return _resolvePackageUri(uri);
default:
- // Only handling file, http, and package URIs
+ // Only handling file, http[s], and package URIs
// in standalone binary.
if (_logBuiltin) {
_print('# Unknown scheme (${uri.scheme}) in $uri.');
@@ -315,7 +317,7 @@
}
-// Asynchronously loads script data through a http or file uri.
+// Asynchronously loads script data through a http[s] or file uri.
_loadDataAsync(int tag, String uri, String libraryUri) {
if (tag == null) {
uri = _resolveScriptUri(uri);
@@ -326,7 +328,7 @@
_print("_loadDataAsync($uri), "
"${_numOutstandingLoadRequests} requests outstanding");
}
- if (resourceUri.scheme == 'http') {
+ if ((resourceUri.scheme == 'http') || (resourceUri.scheme == 'https')) {
_httpGet(resourceUri, libraryUri, (data) {
_loadScript(tag, uri, libraryUri, data);
});
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698