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

Unified Diff: chrome/installer/setup/install.cc

Issue 271099: Re-try r29078: Remove some deprecated file_util wstring functions. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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/common/chrome_plugin_util.cc ('k') | chrome/installer/setup/setup_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/install.cc
===================================================================
--- chrome/installer/setup/install.cc (revision 29088)
+++ chrome/installer/setup/install.cc (working copy)
@@ -157,12 +157,13 @@
// only on the first install of Chrome.
void CopyPreferenceFileForFirstRun(bool system_level,
const std::wstring& prefs_source_path) {
- std::wstring prefs_dest_path(
+ FilePath prefs_dest_path = FilePath::FromWStringHack(
installer::GetChromeInstallPath(system_level));
- file_util::AppendToPath(&prefs_dest_path,
- installer_util::kDefaultMasterPrefs);
- if (!file_util::CopyFile(prefs_source_path, prefs_dest_path))
+ prefs_dest_path = prefs_dest_path.Append(installer_util::kDefaultMasterPrefs);
+ if (!file_util::CopyFile(FilePath::FromWStringHack(prefs_source_path),
+ prefs_dest_path)) {
LOG(INFO) << "Failed to copy master preferences.";
+ }
}
// This method creates Chrome shortcuts in Start->Programs for all users or
@@ -304,7 +305,7 @@
BrowserDistribution* dist = BrowserDistribution::GetDistribution();
std::wstring version_key = dist->GetVersionKey();
- if (file_util::PathExists(new_chrome_exe)) {
+ if (file_util::PathExists(FilePath::FromWStringHack(new_chrome_exe))) {
// Looks like this was in use update. So make sure we update the 'opv' key
// with the current version that is active and 'cmd' key with the rename
// command to run.
@@ -492,7 +493,7 @@
installer_util::kChromeNewExe);
BrowserDistribution* dist = BrowserDistribution::GetDistribution();
RegKey chrome_key(reg_root, dist->GetVersionKey().c_str(), KEY_READ);
- if (file_util::PathExists(new_chrome_exe))
+ if (file_util::PathExists(FilePath::FromWStringHack(new_chrome_exe)))
chrome_key.ReadValue(google_update::kRegOldVersionField, current_version);
if (current_version->empty())
chrome_key.ReadValue(google_update::kRegVersionField, current_version);
« no previous file with comments | « chrome/common/chrome_plugin_util.cc ('k') | chrome/installer/setup/setup_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698