Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(81)

Unified Diff: chrome/browser/user_data_manager.cc

Issue 18248: CommandLine API rework (Closed)
Patch Set: fixes Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/unload_uitest.cc ('k') | chrome/browser/views/frame/browser_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/user_data_manager.cc
diff --git a/chrome/browser/user_data_manager.cc b/chrome/browser/user_data_manager.cc
index 335301673fdf4ad3cfdcd1d1b33f7d77fab3361b..554c53f9e16ca4a6fd9e2c5ef25b9da08ee31ec9 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(
« no previous file with comments | « chrome/browser/unload_uitest.cc ('k') | chrome/browser/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698