summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorsanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-10 07:12:46 +0000
committersanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-10 07:12:46 +0000
commit36f608ea13b53d40f21042749eba3eee50755cd9 (patch)
treeb71ec0b6c19ccd04833d702eaf452526f529c84d /chrome/common
parent8ae437cae9b2d25cd00dd823ade855fbe2359990 (diff)
downloadchromium_src-36f608ea13b53d40f21042749eba3eee50755cd9.zip
chromium_src-36f608ea13b53d40f21042749eba3eee50755cd9.tar.gz
chromium_src-36f608ea13b53d40f21042749eba3eee50755cd9.tar.bz2
Fixed a bug in the implementation of GetServiceProcessLockFileName which caused the version to not get appended. This also caused an error in the clang buidbot.
BUG=None TEST=clang buildbot, Cloud Print proxy on Linux. Review URL: http://codereview.chromium.org/3699001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62109 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/service_process_util.cc23
1 files changed, 9 insertions, 14 deletions
diff --git a/chrome/common/service_process_util.cc b/chrome/common/service_process_util.cc
index 5a664d9..6710059 100644
--- a/chrome/common/service_process_util.cc
+++ b/chrome/common/service_process_util.cc
@@ -61,19 +61,6 @@ std::string GetServiceProcessSharedMemName() {
return GetServiceProcessScopedName("_service_shmem");
}
-// Gets the name of the lock file for service process.
-FilePath GetServiceProcessLockFilePath() {
- FilePath user_data_dir;
- PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
- chrome::VersionInfo version_info;
-#if defined(OS_WIN)
- user_data_dir.Append(ASCIIToWide(version_info.Version()));
-#elif defined(OS_POSIX)
- user_data_dir.Append(version_info.Version());
-#endif // defined(OS_WIN)
- return user_data_dir.Append(FILE_PATH_LITERAL("Service Process Lock"));
-}
-
enum ServiceProcessRunningState {
SERVICE_NOT_RUNNING,
SERVICE_OLDER_VERSION_RUNNING,
@@ -166,7 +153,15 @@ class ServiceProcessShutdownMonitor : public base::ObjectWatcher::Delegate {
base::ObjectWatcher watcher_;
scoped_ptr<Task> shutdown_task_;
};
-
+#else // defined(OS_WIN)
+// Gets the name of the lock file for service process. Used on non-Windows OSes.
+FilePath GetServiceProcessLockFilePath() {
+ FilePath user_data_dir;
+ PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
+ chrome::VersionInfo version_info;
+ std::string lock_file_name = version_info.Version() + "Service Process Lock";
+ return user_data_dir.Append(lock_file_name);
+}
#endif // defined(OS_WIN)
struct ServiceProcessGlobalState {