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

Unified Diff: mojo/shell/mojo_url_resolver.cc

Issue 339943002: Small fixes in mojo_shell for android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 6 years, 6 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/mojo.gyp ('k') | mojo/shell/shell_test_base.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 9591b1df142b76cb8321f59aa216e8fab47e559c..35059547e94d797cdc7ffa993de6a8d5841f3112 100644
--- a/mojo/shell/mojo_url_resolver.cc
+++ b/mojo/shell/mojo_url_resolver.cc
@@ -18,7 +18,7 @@ namespace {
std::string MakeSharedLibraryName(const std::string& host_name) {
#if defined(OS_WIN)
return host_name + ".dll";
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_ANDROID)
return "lib" + host_name + ".so";
#elif defined(OS_MACOSX)
return "lib" + host_name + ".dylib";
@@ -57,10 +57,15 @@ GURL MojoURLResolver::Resolve(const GURL& mojo_url) const {
if (local_file_set_.find(mojo_url) != local_file_set_.end()) {
// Resolve to a local file URL.
base::FilePath path;
+#if defined(OS_ANDROID)
+ // On Android, additional lib are bundled.
+ PathService::Get(base::DIR_MODULE, &path);
+#else
PathService::Get(base::DIR_EXE, &path);
#if !defined(OS_WIN)
path = path.Append(FILE_PATH_LITERAL("lib"));
-#endif
+#endif // !defined(OS_WIN)
+#endif // defined(OS_ANDROID)
path = path.Append(base::FilePath::FromUTF8Unsafe(lib));
return net::FilePathToFileURL(path);
}
« no previous file with comments | « mojo/mojo.gyp ('k') | mojo/shell/shell_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698