diff options
author | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-08 02:21:14 +0000 |
---|---|---|
committer | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-08 02:21:14 +0000 |
commit | 37b89cacd9d5aa309eeb3689c8871c9c07d3b879 (patch) | |
tree | 4761d403b75677b353505917293b3143932b408c /chrome/browser/process_singleton_linux.cc | |
parent | 28d71e393714656977b42ac5ccd27acd68aa4448 (diff) | |
download | chromium_src-37b89cacd9d5aa309eeb3689c8871c9c07d3b879.zip chromium_src-37b89cacd9d5aa309eeb3689c8871c9c07d3b879.tar.gz chromium_src-37b89cacd9d5aa309eeb3689c8871c9c07d3b879.tar.bz2 |
Honor profile directory when creating new window in existing browser
Using the "-profile-directory" switch didn't work if the browser was already running.
The problem was that we were ignoring the switch and just using the last used profile.
BUG=100461
TEST=Ran Chrome with the first profile open. Launched a 2nd instance with "-profile-directory" and verified that the correct profile window opened.
Review URL: http://codereview.chromium.org/8854001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113534 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/process_singleton_linux.cc')
-rw-r--r-- | chrome/browser/process_singleton_linux.cc | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/chrome/browser/process_singleton_linux.cc b/chrome/browser/process_singleton_linux.cc index 34feef1..d915637 100644 --- a/chrome/browser/process_singleton_linux.cc +++ b/chrome/browser/process_singleton_linux.cc @@ -641,15 +641,6 @@ void ProcessSingleton::LinuxWatcher::HandleMessage( PrefService* prefs = g_browser_process->local_state(); DCHECK(prefs); - Profile* profile = ProfileManager::GetLastUsedProfile(); - - if (!profile) { - // We should only be able to get here if the profile already exists and - // has been created. - NOTREACHED(); - return; - } - // Ignore the request if the process was passed the --product-version flag. // Normally we wouldn't get here if that flag had been passed, but it can // happen if it is passed to an older version of chrome. Since newer versions @@ -661,10 +652,8 @@ void ProcessSingleton::LinuxWatcher::HandleMessage( } else { // Run the browser startup sequence again, with the command line of the // signalling process. - FilePath current_dir_file_path(current_dir); - BrowserInit::ProcessCommandLine(parsed_command_line, current_dir_file_path, - false /* not process startup */, profile, - NULL); + BrowserInit::ProcessCommandLineAlreadyRunning( + parsed_command_line, FilePath(current_dir)); } // Send back "ACK" message to prevent the client process from starting up. |