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

Unified Diff: runtime/vm/uri.h

Issue 2011543002: Canonicalize uris in C++ instead of Dart for the standalone embedder. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixz release build Created 4 years, 7 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 | « runtime/vm/unit_test.cc ('k') | runtime/vm/uri.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/uri.h
diff --git a/runtime/vm/uri.h b/runtime/vm/uri.h
new file mode 100644
index 0000000000000000000000000000000000000000..453b3717f78dfdfd98b3e5cf32ba14374f97afc5
--- /dev/null
+++ b/runtime/vm/uri.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef VM_URI_H_
+#define VM_URI_H_
+
+#include "platform/utils.h"
+#include "vm/globals.h"
+
+namespace dart {
+
+struct ParsedUri {
+ const char* scheme;
+ const char* userinfo;
+ const char* host;
+ const char* port;
+ const char* path;
+ const char* query;
+ const char* fragment;
+};
+
+// Parses a uri into its parts. Returns false if the parse fails.
+bool ParseUri(const char* uri, ParsedUri* parsed_uri);
+
+// Resolves some reference uri with respect to a base uri.
+bool ResolveUri(const char* ref_uri,
+ const char* base_uri,
+ const char** target_uri);
+
+} // namespace dart
+
+#endif // VM_URI_H_
« no previous file with comments | « runtime/vm/unit_test.cc ('k') | runtime/vm/uri.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698