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

Unified Diff: mojo/shell/mojo_url_resolver.cc

Issue 668483002: Change mojo URLs from mojo://mojo_foo to mojo://foo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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 | « mojo/shell/dynamic_application_loader.cc ('k') | mojo/shell/mojo_url_resolver_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/mojo_url_resolver.cc
diff --git a/mojo/shell/mojo_url_resolver.cc b/mojo/shell/mojo_url_resolver.cc
index 75c625ca6c3fb44105f812f34f0d48d807f3dc24..b7bc8433a856043a0ba657c94591e0d86e6a2f5a 100644
--- a/mojo/shell/mojo_url_resolver.cc
+++ b/mojo/shell/mojo_url_resolver.cc
@@ -8,6 +8,7 @@
#include "base/files/file_path.h"
#include "base/logging.h"
#include "base/path_service.h"
+#include "base/strings/string_util.h"
#include "net/base/filename_util.h"
#include "url/url_util.h"
@@ -15,7 +16,14 @@ namespace mojo {
namespace shell {
namespace {
-std::string MakeSharedLibraryName(const std::string& host_name) {
+std::string MakeSharedLibraryName(std::string host_name) {
+ // TODO(aa): This should go away soon. In the Chromium repo, all the app
+ // target names start with "mojo_" by convention. But when we have an SDK,
+ // one would assume the libraries would have names that don't have this bit.
+ std::string prefix = "mojo_";
+ if (!StartsWithASCII(host_name, prefix, true))
+ host_name = prefix + host_name;
abarth-chromium 2014/10/20 16:34:15 This broke Sky because the sky targets are prefixe
+
#if defined(OS_WIN)
return host_name + ".dll";
#elif defined(OS_LINUX) || defined(OS_ANDROID)
« no previous file with comments | « mojo/shell/dynamic_application_loader.cc ('k') | mojo/shell/mojo_url_resolver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698