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

Unified Diff: chrome/test/base/chrome_test_suite.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 | « base/process_util_linux.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/chrome_test_suite.cc
===================================================================
--- chrome/test/base/chrome_test_suite.cc (revision 156845)
+++ chrome/test/base/chrome_test_suite.cc (working copy)
@@ -61,14 +61,15 @@
bool IsCrosPythonProcess() {
#if defined(OS_CHROMEOS)
char buf[80];
- int num_read = readlink("/proc/self/exe", buf, sizeof(buf) - 1);
+ int num_read = readlink(base::kProcSelfExe, buf, sizeof(buf) - 1);
if (num_read == -1)
return false;
buf[num_read] = 0;
const char kPythonPrefix[] = "/python";
return !strncmp(strrchr(buf, '/'), kPythonPrefix, sizeof(kPythonPrefix) - 1);
+#else
+ return false;
#endif // defined(OS_CHROMEOS)
- return false;
}
// In many cases it may be not obvious that a test makes a real DNS lookup.
« no previous file with comments | « base/process_util_linux.cc ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698