summaryrefslogtreecommitdiffstats
path: root/chrome/browser/process_singleton_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/process_singleton_linux.cc')
-rw-r--r--chrome/browser/process_singleton_linux.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/browser/process_singleton_linux.cc b/chrome/browser/process_singleton_linux.cc
index 046d7f9..ae507fa 100644
--- a/chrome/browser/process_singleton_linux.cc
+++ b/chrome/browser/process_singleton_linux.cc
@@ -507,7 +507,21 @@ void ProcessSingleton::LinuxWatcher::HandleMessage(
FilePath user_data_dir;
PathService::Get(chrome::DIR_USER_DATA, &user_data_dir);
ProfileManager* profile_manager = g_browser_process->profile_manager();
+
+#if defined(OS_CHROMEOS)
+ Profile* profile;
+ if (parsed_command_line.HasSwitch(switches::kProfile)) {
+ std::wstring profile_dir =
+ parsed_command_line.GetSwitchValue(switches::kProfile);
+ profile = profile_manager->GetProfile(
+ user_data_dir.Append(FilePath::FromWStringHack(profile_dir)));
+ } else {
+ profile = profile_manager->GetDefaultProfile(user_data_dir);
+ }
+#else
Profile* profile = profile_manager->GetDefaultProfile(user_data_dir);
+#endif
+
if (!profile) {
// We should only be able to get here if the profile already exists and
// has been created.