diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-30 21:18:51 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-30 21:18:51 +0000 |
commit | 9acc48601ea4aff4e5ec977c0dd089e887ba5ffd (patch) | |
tree | 9c0ef6715ab756b6c8eafb5f4385eaab73a3a8ab /chrome/browser/process_singleton_linux.cc | |
parent | 8d7690b29c0572c62bbe72817ac3b5195bf38e42 (diff) | |
download | chromium_src-9acc48601ea4aff4e5ec977c0dd089e887ba5ffd.zip chromium_src-9acc48601ea4aff4e5ec977c0dd089e887ba5ffd.tar.gz chromium_src-9acc48601ea4aff4e5ec977c0dd089e887ba5ffd.tar.bz2 |
Add -profile command line switch
Review URL: http://codereview.chromium.org/384062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33335 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/process_singleton_linux.cc')
-rw-r--r-- | chrome/browser/process_singleton_linux.cc | 14 |
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. |