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

Unified Diff: base/base_paths_android.cc

Issue 10914279: Cleanup: Add a const variable for /proc/self/exe. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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 | « no previous file | base/base_paths_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/base_paths_android.cc
===================================================================
--- base/base_paths_android.cc (revision 156845)
+++ base/base_paths_android.cc (working copy)
@@ -11,22 +11,17 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
+#include "base/process_util.h"
-namespace {
-
-const char kSelfExe[] = "/proc/self/exe";
-
-} // namespace
-
namespace base {
bool PathProviderAndroid(int key, FilePath* result) {
switch (key) {
case base::FILE_EXE: {
char bin_dir[PATH_MAX + 1];
- int bin_dir_size = readlink(kSelfExe, bin_dir, PATH_MAX);
+ int bin_dir_size = readlink(kProcSelfExe, bin_dir, PATH_MAX);
if (bin_dir_size < 0 || bin_dir_size > PATH_MAX) {
- NOTREACHED() << "Unable to resolve " << kSelfExe << ".";
+ NOTREACHED() << "Unable to resolve " << kProcSelfExe << ".";
return false;
}
bin_dir[bin_dir_size] = 0;
« no previous file with comments | « no previous file | base/base_paths_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698