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

Side by Side Diff: runtime/bin/dartutils.h

Issue 15736023: Remove hack http client and use the one in dart:io (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
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 #ifndef BIN_DARTUTILS_H_ 5 #ifndef BIN_DARTUTILS_H_
6 #define BIN_DARTUTILS_H_ 6 #define BIN_DARTUTILS_H_
7 7
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 9
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 static void ReadFile(const uint8_t** data, intptr_t* file_len, void* stream); 114 static void ReadFile(const uint8_t** data, intptr_t* file_len, void* stream);
115 static void WriteFile(const void* buffer, intptr_t num_bytes, void* stream); 115 static void WriteFile(const void* buffer, intptr_t num_bytes, void* stream);
116 static void CloseFile(void* stream); 116 static void CloseFile(void* stream);
117 static Dart_Handle ReadStringFromFile(const char* filename); 117 static Dart_Handle ReadStringFromFile(const char* filename);
118 static Dart_Handle ReadStringFromHttp(const char* filename); 118 static Dart_Handle ReadStringFromHttp(const char* filename);
119 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, 119 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag,
120 Dart_Handle library, 120 Dart_Handle library,
121 Dart_Handle url); 121 Dart_Handle url);
122 static Dart_Handle LoadScript(const char* script_uri, 122 static Dart_Handle LoadScript(const char* script_uri,
123 Dart_Handle builtin_lib); 123 Dart_Handle builtin_lib);
124 static Dart_Handle LoadScriptHttp(const char* script_uri, 124 static Dart_Handle LoadScriptHttp(Dart_Handle script_uri,
125 Dart_Handle builtin_lib); 125 Dart_Handle builtin_lib);
126 static Dart_Handle LoadSource(CommandLineOptions* url_mapping, 126 static Dart_Handle LoadSource(CommandLineOptions* url_mapping,
127 Dart_Handle library, 127 Dart_Handle library,
128 Dart_Handle url, 128 Dart_Handle url,
129 Dart_LibraryTag tag, 129 Dart_LibraryTag tag,
130 const char* filename); 130 const char* filename);
131 static Dart_Handle PrepareForScriptLoading(const char* package_root, 131 static Dart_Handle PrepareForScriptLoading(const char* package_root,
132 Dart_Handle builtin_lib); 132 Dart_Handle builtin_lib);
133 133
134 static bool PostNull(Dart_Port port_id); 134 static bool PostNull(Dart_Port port_id);
(...skipping 26 matching lines...) Expand all
161 161
162 static const char* MapLibraryUrl(CommandLineOptions* url_mapping, 162 static const char* MapLibraryUrl(CommandLineOptions* url_mapping,
163 const char* url_string); 163 const char* url_string);
164 164
165 static Dart_Handle ResolveScriptUri(Dart_Handle script_uri, 165 static Dart_Handle ResolveScriptUri(Dart_Handle script_uri,
166 Dart_Handle builtin_lib); 166 Dart_Handle builtin_lib);
167 167
168 static Dart_Handle FilePathFromUri(Dart_Handle script_uri, 168 static Dart_Handle FilePathFromUri(Dart_Handle script_uri,
169 Dart_Handle builtin_lib); 169 Dart_Handle builtin_lib);
170 170
171 static Dart_Handle PathFromUri(Dart_Handle script_uri,
172 Dart_Handle builtin_lib);
173
174 static Dart_Handle DomainFromUri(Dart_Handle script_uri,
175 Dart_Handle builtin_lib);
176
177 static Dart_Handle PortFromUri(Dart_Handle script_uri,
178 Dart_Handle builtin_lib);
179
180 static Dart_Handle ResolveUri(Dart_Handle library_url, 171 static Dart_Handle ResolveUri(Dart_Handle library_url,
181 Dart_Handle url, 172 Dart_Handle url,
182 Dart_Handle builtin_lib); 173 Dart_Handle builtin_lib);
183 174
184 // Sniffs the specified text_buffer to see if it contains the magic number 175 // Sniffs the specified text_buffer to see if it contains the magic number
185 // representing a script snapshot. If the text_buffer is a script snapshot 176 // representing a script snapshot. If the text_buffer is a script snapshot
186 // the return value is an updated pointer to the text_buffer pointing past 177 // the return value is an updated pointer to the text_buffer pointing past
187 // the magic number value. The 'buffer_len' parameter is also appropriately 178 // the magic number value. The 'buffer_len' parameter is also appropriately
188 // adjusted. 179 // adjusted.
189 static const uint8_t* SniffForMagicNumber(const uint8_t* text_buffer, 180 static const uint8_t* SniffForMagicNumber(const uint8_t* text_buffer,
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 } 507 }
517 508
518 private: 509 private:
519 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array); 510 DISALLOW_COPY_AND_ASSIGN(CObjectExternalUint8Array);
520 }; 511 };
521 512
522 } // namespace bin 513 } // namespace bin
523 } // namespace dart 514 } // namespace dart
524 515
525 #endif // BIN_DARTUTILS_H_ 516 #endif // BIN_DARTUTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698