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

Unified Diff: chrome/browser/user_data_manager.cc

Issue 654013: Deprecate file_util::AppendToPath() on non-Windows. (Closed)
Patch Set: ok Created 10 years, 10 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/chrome_plugin_host.cc ('k') | chrome/common/chrome_constants.h » ('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 7694c88ae904c21193e4924f1a493c66ed27ac14..7d9c98a569786d3d8074b5070071431028319ee5 100644
--- a/chrome/browser/user_data_manager.cc
+++ b/chrome/browser/user_data_manager.cc
@@ -221,9 +221,10 @@ std::wstring UserDataManager::GetFolderNameFromProfileName(
std::wstring UserDataManager::GetUserDataFolderForProfile(
const std::wstring& profile_name) const {
std::wstring folder_name = GetFolderNameFromProfileName(profile_name);
- std::wstring folder_path(user_data_root_);
- file_util::AppendToPath(&folder_path, folder_name);
- return folder_path;
+ FilePath folder_path =
+ FilePath::FromWStringHack(user_data_root_)
+ .Append(FilePath::FromWStringHack(folder_name));
+ return folder_path.ToWStringHack();
}
void UserDataManager::LaunchChromeForProfile(
@@ -289,8 +290,7 @@ bool UserDataManager::CreateShortcutForProfileInFolder(
IDS_START_IN_PROFILE_SHORTCUT_NAME,
profile_name);
shortcut_name.append(L".lnk");
-
- std::wstring shortcut_path = folder.Append(shortcut_name).ToWStringHack();
+ FilePath shortcut_path = folder.Append(shortcut_name);
// Profile path from user_data_dir.
FilePath profile_path = FilePath(user_data_dir).Append(
@@ -298,7 +298,7 @@ bool UserDataManager::CreateShortcutForProfileInFolder(
return file_util::CreateShortcutLink(
cmd.c_str(),
- shortcut_path.c_str(),
+ shortcut_path.value().c_str(),
exe_folder.c_str(),
args.c_str(),
NULL,
@@ -306,6 +306,9 @@ bool UserDataManager::CreateShortcutForProfileInFolder(
0,
ShellIntegration::GetChromiumAppId(profile_path).c_str());
#else
+ // TODO(port): should probably use freedesktop.org standard for desktop files.
+ // See shell_integration.h for an implementation; but this code is reportedly
+ // obsolete.
NOTIMPLEMENTED();
return false;
#endif
@@ -321,6 +324,8 @@ bool UserDataManager::CreateDesktopShortcutForProfile(
return CreateShortcutForProfileInFolder(FilePath(desktop_path), profile_name);
#else
// TODO(port): should probably use freedesktop.org standard for desktop files.
+ // See shell_integration.h for an implementation; but this code is reportedly
+ // obsolete.
NOTIMPLEMENTED();
return false;
#endif
« no previous file with comments | « chrome/browser/chrome_plugin_host.cc ('k') | chrome/common/chrome_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698