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

Unified Diff: mojo/shell/shell_test_base.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/shell/mojo_url_resolver.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/shell_test_base.cc
diff --git a/mojo/shell/shell_test_base.cc b/mojo/shell/shell_test_base.cc
index b4f0e4b646ab8c396b79006399a8e639d62df479..947e70efdc17a88f31cf6bcc5c82adce00f2d312 100644
--- a/mojo/shell/shell_test_base.cc
+++ b/mojo/shell/shell_test_base.cc
@@ -8,6 +8,7 @@
#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/logging.h"
+#include "base/path_service.h"
#include "build/build_config.h"
#include "mojo/shell/context.h"
#include "net/base/filename_util.h"
@@ -37,10 +38,14 @@ void ShellTestBase::LaunchServiceInProcess(
DCHECK(message_loop_);
DCHECK(shell_context_);
- base::FilePath base_dir = base::MakeAbsoluteFilePath(
- base::CommandLine::ForCurrentProcess()->GetProgram().DirName());
+ base::FilePath base_dir;
+ CHECK(PathService::Get(base::DIR_EXE, &base_dir));
+ // On android, the library is bundled with the app.
+#if defined(OS_ANDROID)
+ base::FilePath service_dir;
+ CHECK(PathService::Get(base::DIR_MODULE, &service_dir));
// On Mac and Windows, libraries are dumped beside the executables.
-#if defined(OS_MACOSX) || defined(OS_WIN)
+#elif defined(OS_MACOSX) || defined(OS_WIN)
base::FilePath service_dir(base_dir);
#else
// On Linux, they're under lib/.
« no previous file with comments | « mojo/shell/mojo_url_resolver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698