Create user_data_dir before creating singleton lock

This commit is contained in:
Cheng Zhao 2016-04-27 21:46:44 +09:00
parent 302a6e42bd
commit 4435cdc576
2 changed files with 6 additions and 0 deletions

View file

@ -717,6 +717,9 @@ ProcessSingleton::ProcessSingleton(
const NotificationCallback& notification_callback)
: notification_callback_(notification_callback),
current_pid_(base::GetCurrentProcId()) {
// The user_data_dir may have not been created yet.
base::CreateDirectoryAndGetError(user_data_dir, nullptr);
socket_path_ = user_data_dir.Append(kSingletonSocketFilename);
lock_path_ = user_data_dir.Append(kSingletonLockFilename);
cookie_path_ = user_data_dir.Append(kSingletonCookieFilename);