From bb97536b768ac68fcbc4605c35461a798ef6e5ff Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Wed, 21 Jan 2009 01:00:22 +0000 Subject: Make CommandLine into a normal object, with some statics for getting at the current process's command line. One explicit goal of this change is to *not* deal with the string/wstring issues at the API on POSIX; the functions are the same as before, which means they remain as broken as before. (I did try to fix the internals, though, so migrating the callers is now possible by adding platform-appropriate hooks.) Review URL: http://codereview.chromium.org/18248 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8347 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/user_data_manager.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'chrome/browser/user_data_manager.cc') diff --git a/chrome/browser/user_data_manager.cc b/chrome/browser/user_data_manager.cc index 3353016..554c53f 100644 --- a/chrome/browser/user_data_manager.cc +++ b/chrome/browser/user_data_manager.cc @@ -177,15 +177,14 @@ std::wstring UserDataManager::GetCommandForProfile( std::wstring user_data_dir = GetUserDataFolderForProfile(profile_name); std::wstring command; PathService::Get(base::FILE_EXE, &command); - CommandLine::AppendSwitchWithValue(&command, - switches::kUserDataDir, + CommandLine command_line(command); + command_line.AppendSwitchWithValue(switches::kUserDataDir, user_data_dir); std::wstring local_state_path; PathService::Get(chrome::FILE_LOCAL_STATE, &local_state_path); - CommandLine::AppendSwitchWithValue(&command, - switches::kParentProfile, + command_line.AppendSwitchWithValue(switches::kParentProfile, local_state_path); - return command; + return command_line.command_line_string(); } void UserDataManager::LaunchChromeForProfile( -- cgit v1.1