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

Unified Diff: shell/dynamic_application_loader.cc

Issue 821403003: Changes magic sequence to '!#mojo ' and strips 'mojo ' when building url (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: two more Created 5 years, 11 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 | « services/js/test/pingpong_target.js ('k') | sky/examples/home.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/dynamic_application_loader.cc
diff --git a/shell/dynamic_application_loader.cc b/shell/dynamic_application_loader.cc
index 72ca835faa3b98339568ce548c5cc8a6ea407c8a..e350b409dea92aff9168d654b726b6be3be3f4da 100644
--- a/shell/dynamic_application_loader.cc
+++ b/shell/dynamic_application_loader.cc
@@ -31,7 +31,7 @@ namespace shell {
namespace {
-static const char kMojoMagic[] = "#!mojo:";
+static const char kMojoMagic[] = "#!mojo ";
static const size_t kMaxShebangLength = 2048;
void IgnoreResult(bool result) {
@@ -81,7 +81,7 @@ class DynamicApplicationLoader::Loader {
virtual bool PeekFirstLine(std::string* line) = 0;
void Load() {
- // If the response begins with a #!mojo:<content-handler-url>, use it.
+ // If the response begins with a #!mojo <content-handler-url>, use it.
GURL url;
std::string shebang;
if (PeekContentHandler(&shebang, &url)) {
@@ -116,7 +116,7 @@ class DynamicApplicationLoader::Loader {
GURL* mojo_content_handler_url) {
std::string shebang;
if (HasMojoMagic() && PeekFirstLine(&shebang)) {
- GURL url(shebang.substr(2, std::string::npos));
+ GURL url(shebang.substr(arraysize(kMojoMagic) - 1, std::string::npos));
if (url.is_valid()) {
*mojo_shebang = shebang;
*mojo_content_handler_url = url;
« no previous file with comments | « services/js/test/pingpong_target.js ('k') | sky/examples/home.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698