| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include "chrome/browser/user_data_manager.h" | 7 #include "chrome/browser/user_data_manager.h" |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 const std::wstring& profile_name) const { | 181 const std::wstring& profile_name) const { |
| 182 std::wstring folder_name = GetFolderNameFromProfileName(profile_name); | 182 std::wstring folder_name = GetFolderNameFromProfileName(profile_name); |
| 183 std::wstring folder_path(user_data_root_); | 183 std::wstring folder_path(user_data_root_); |
| 184 file_util::AppendToPath(&folder_path, folder_name); | 184 file_util::AppendToPath(&folder_path, folder_name); |
| 185 return folder_path; | 185 return folder_path; |
| 186 } | 186 } |
| 187 | 187 |
| 188 void UserDataManager::LaunchChromeForProfile( | 188 void UserDataManager::LaunchChromeForProfile( |
| 189 const std::wstring& profile_name) const { | 189 const std::wstring& profile_name) const { |
| 190 std::wstring user_data_dir = GetUserDataFolderForProfile(profile_name); | 190 std::wstring user_data_dir = GetUserDataFolderForProfile(profile_name); |
| 191 std::wstring command; | 191 FilePath command; |
| 192 DeprecatedPathServiceGet(base::FILE_EXE, &command); | 192 PathService::Get(base::FILE_EXE, &command); |
| 193 CommandLine command_line(command); | 193 CommandLine command_line(command); |
| 194 command_line.AppendSwitch(switches::kEnableUserDataDirProfiles); | 194 command_line.AppendSwitch(switches::kEnableUserDataDirProfiles); |
| 195 command_line.AppendSwitchWithValue(switches::kUserDataDir, | 195 command_line.AppendSwitchWithValue(switches::kUserDataDir, |
| 196 user_data_dir); | 196 user_data_dir); |
| 197 std::wstring local_state_path; | 197 std::wstring local_state_path; |
| 198 DeprecatedPathServiceGet(chrome::FILE_LOCAL_STATE, &local_state_path); | 198 DeprecatedPathServiceGet(chrome::FILE_LOCAL_STATE, &local_state_path); |
| 199 command_line.AppendSwitchWithValue(switches::kParentProfile, | 199 command_line.AppendSwitchWithValue(switches::kParentProfile, |
| 200 local_state_path); | 200 local_state_path); |
| 201 base::LaunchApp(command_line, false, false, NULL); | 201 base::LaunchApp(command_line, false, false, NULL); |
| 202 } | 202 } |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 &GetProfilesHelper::InvokeDelegate, | 312 &GetProfilesHelper::InvokeDelegate, |
| 313 profiles.release())); | 313 profiles.release())); |
| 314 } | 314 } |
| 315 | 315 |
| 316 void GetProfilesHelper::InvokeDelegate(std::vector<std::wstring>* profiles) { | 316 void GetProfilesHelper::InvokeDelegate(std::vector<std::wstring>* profiles) { |
| 317 scoped_ptr< std::vector<std::wstring> > udd_profiles(profiles); | 317 scoped_ptr< std::vector<std::wstring> > udd_profiles(profiles); |
| 318 // If the delegate is gone by now, no need to do any work. | 318 // If the delegate is gone by now, no need to do any work. |
| 319 if (delegate_) | 319 if (delegate_) |
| 320 delegate_->OnGetProfilesDone(*udd_profiles.get()); | 320 delegate_->OnGetProfilesDone(*udd_profiles.get()); |
| 321 } | 321 } |
| OLD | NEW |