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

Unified Diff: mojo/shell/mojo_url_resolver.cc

Issue 659733003: Revert "Remove 'mojo_' prefix from all mojo applications." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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/BUILD.gn ('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 beaa8d8546ab80b5d43b4f819dff9f73c1258370..8d37237d40e0c99f3c9915a607045505025ce470 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 "mojo/shell/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;
+
#if defined(OS_WIN)
return host_name + ".dll";
#elif defined(OS_LINUX) || defined(OS_ANDROID)
« no previous file with comments | « mojo/shell/BUILD.gn ('k') | mojo/shell/mojo_url_resolver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698