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

Unified Diff: chrome/browser/user_data_manager.cc

Issue 2110021: Use FilePath::DirName instead of the deprecated file_util::GetDirectoryFromPath. (Closed) Base URL: git://git.chromium.org/chromium.git
Patch Set: fix win Created 10 years, 7 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 | « no previous file | chrome/browser/web_applications/web_app.cc » ('j') | chrome/installer/setup/uninstall.cc » ('J')
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 25bd3660900bd64159bc907be151038e67131b55..b299ffa076c8eecf93f65d30dd9babb0b9a83e65 100644
--- a/chrome/browser/user_data_manager.cc
+++ b/chrome/browser/user_data_manager.cc
@@ -258,16 +258,16 @@ bool UserDataManager::CreateShortcutForProfileInFolder(
const FilePath& folder,
const std::wstring& profile_name) const {
#if defined(OS_WIN)
- std::wstring exe_path;
+ FilePath exe_path;
if (!PathService::Get(base::FILE_EXE, &exe_path))
return false;
// Working directory.
- std::wstring exe_folder = file_util::GetDirectoryFromPath(exe_path);
+ FilePath exe_folder = exe_path.DirName();
// Command and arguments.
std::wstring cmd;
- cmd = StringPrintf(L"\"%ls\"", exe_path.c_str());
+ cmd = StringPrintf(L"\"%ls\"", exe_path.value().c_str());
std::wstring user_data_dir = GetUserDataFolderForProfile(profile_name);
std::wstring args = CommandLine::PrefixedSwitchStringWithValue(
switches::kUserDataDir,
@@ -288,10 +288,10 @@ bool UserDataManager::CreateShortcutForProfileInFolder(
return file_util::CreateShortcutLink(
cmd.c_str(),
shortcut_path.value().c_str(),
- exe_folder.c_str(),
+ exe_folder.value().c_str(),
args.c_str(),
NULL,
- exe_path.c_str(),
+ exe_path.value().c_str(),
0,
ShellIntegration::GetChromiumAppId(profile_path).c_str());
#else
« no previous file with comments | « no previous file | chrome/browser/web_applications/web_app.cc » ('j') | chrome/installer/setup/uninstall.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698