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

Unified Diff: chrome/browser/web_applications/web_app.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
Index: chrome/browser/web_applications/web_app.cc
diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc
index 0674c0d928c39f78d68f3599e108cc7eda9a2e94..d84ad6780937ddfa3f33970e17b56d7e7ef99b81 100644
--- a/chrome/browser/web_applications/web_app.cc
+++ b/chrome/browser/web_applications/web_app.cc
@@ -355,14 +355,14 @@ bool CreateShortcutTask::CreateShortcut() {
return false;
}
- std::wstring chrome_exe;
+ FilePath chrome_exe;
if (!PathService::Get(base::FILE_EXE, &chrome_exe)) {
NOTREACHED();
return false;
}
// Working directory.
- std::wstring chrome_folder = file_util::GetDirectoryFromPath(chrome_exe);
+ FilePath chrome_folder = chrome_exe.DirName();
std::string switches =
ShellIntegration::GetCommandLineArgumentsCommon(shortcut_info_.url,
@@ -393,9 +393,9 @@ bool CreateShortcutTask::CreateShortcut() {
download_util::AppendNumberToPath(&shortcut_file, unique_number);
}
- success &= file_util::CreateShortcutLink(chrome_exe.c_str(),
+ success &= file_util::CreateShortcutLink(chrome_exe.value().c_str(),
shortcut_file.value().c_str(),
- chrome_folder.c_str(),
+ chrome_folder.value().c_str(),
wide_switchs.c_str(),
shortcut_info_.description.c_str(),
icon_file.value().c_str(),

Powered by Google App Engine
This is Rietveld 408576698