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

Unified Diff: runtime/bin/dartutils.cc

Issue 9430051: Add native extensions to the Dart shell, on the linux platform. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove stray edits. Created 8 years, 10 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
Index: runtime/bin/dartutils.cc
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index b472e7975946cb8c2b8f01a183560ba6053f06e6..4bd5e0be4e247f65a834cb0e9040dfb12755b3a3 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -10,6 +10,7 @@
#include "platform/globals.h"
const char* DartUtils::kDartScheme = "dart:";
+const char* DartUtils::kDartExtensionScheme = "dartext:";
Mads Ager (google) 2012/02/23 09:26:56 Should we make this "dart-ext:"?
const char* DartUtils::kBuiltinLibURL = "dart:builtin";
const char* DartUtils::kCoreLibURL = "dart:core";
const char* DartUtils::kCoreImplLibURL = "dart:coreimpl";
@@ -104,6 +105,15 @@ bool DartUtils::IsDartSchemeURL(const char* url_name) {
}
+bool DartUtils::IsDartExtensionSchemeURL(const char* url_name) {
+ static const intptr_t kDartExtensionSchemeLen = strlen(kDartExtensionScheme);
+ // If the URL starts with "dartext:" then it is considered as a special
+ // extension library URL which is handled differently from other URLs.
+ return
+ (strncmp(url_name, kDartExtensionScheme, kDartExtensionSchemeLen) == 0);
+}
+
+
bool DartUtils::IsDartIOLibURL(const char* url_name) {
return (strcmp(url_name, kIOLibURL) == 0);
}
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/extensions.h » ('j') | runtime/bin/extensions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698