diff options
author | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 03:41:02 +0000 |
---|---|---|
committer | estade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-15 03:41:02 +0000 |
commit | 6ec54c1e86aa5d29c7223a86acbfa850be39c806 (patch) | |
tree | 8c0be0238c2f35646c3545060375a9032c50b04d /chrome/installer/setup | |
parent | 89f580b14355e7342cff030747d12ec18f8ca012 (diff) | |
download | chromium_src-6ec54c1e86aa5d29c7223a86acbfa850be39c806.zip chromium_src-6ec54c1e86aa5d29c7223a86acbfa850be39c806.tar.gz chromium_src-6ec54c1e86aa5d29c7223a86acbfa850be39c806.tar.bz2 |
Revert wstring patch (r29078 and follow up commits). It is causing failures on the buildbots.
TBR=nsylvain
Review URL: http://codereview.chromium.org/280004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/setup')
-rw-r--r-- | chrome/installer/setup/install.cc | 13 | ||||
-rw-r--r-- | chrome/installer/setup/setup_main.cc | 7 |
2 files changed, 9 insertions, 11 deletions
diff --git a/chrome/installer/setup/install.cc b/chrome/installer/setup/install.cc index ce211fd1..1bc8164 100644 --- a/chrome/installer/setup/install.cc +++ b/chrome/installer/setup/install.cc @@ -157,13 +157,12 @@ void AddUninstallShortcutWorkItems(HKEY reg_root, // only on the first install of Chrome. void CopyPreferenceFileForFirstRun(bool system_level, const std::wstring& prefs_source_path) { - FilePath prefs_dest_path = FilePath::FromWStringHack( + std::wstring prefs_dest_path( installer::GetChromeInstallPath(system_level)); - prefs_dest_path = prefs_dest_path.Append(installer_util::kDefaultMasterPrefs); - if (!file_util::CopyFile(FilePath::FromWStringHack(prefs_source_path), - prefs_dest_path)) { + file_util::AppendToPath(&prefs_dest_path, + installer_util::kDefaultMasterPrefs); + if (!file_util::CopyFile(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 @@ -305,7 +304,7 @@ bool DoPostInstallTasks(HKEY reg_root, BrowserDistribution* dist = BrowserDistribution::GetDistribution(); std::wstring version_key = dist->GetVersionKey(); - if (file_util::PathExists(FilePath::FromWStringHack(new_chrome_exe))) { + if (file_util::PathExists(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. @@ -493,7 +492,7 @@ bool InstallNewVersion(const std::wstring& exe_path, installer_util::kChromeNewExe); BrowserDistribution* dist = BrowserDistribution::GetDistribution(); RegKey chrome_key(reg_root, dist->GetVersionKey().c_str(), KEY_READ); - if (file_util::PathExists(FilePath::FromWStringHack(new_chrome_exe))) + if (file_util::PathExists(new_chrome_exe)) chrome_key.ReadValue(google_update::kRegOldVersionField, current_version); if (current_version->empty()) chrome_key.ReadValue(google_update::kRegVersionField, current_version); diff --git a/chrome/installer/setup/setup_main.cc b/chrome/installer/setup/setup_main.cc index f20e307..3b5377d 100644 --- a/chrome/installer/setup/setup_main.cc +++ b/chrome/installer/setup/setup_main.cc @@ -67,7 +67,7 @@ DWORD UnPackArchive(const std::wstring& archive, bool system_install, // Check if this is differential update and if it is, patch it to the // installer archive that should already be on the machine. We assume // it is a differential installer if chrome.7z is not found. - if (!file_util::PathExists(FilePath::FromWStringHack(uncompressed_archive))) { + if (!file_util::PathExists(uncompressed_archive)) { incremental_install = true; LOG(INFO) << "Differential patch found. Applying to existing archive."; if (!installed_version) { @@ -163,11 +163,10 @@ bool CheckPreInstallConditions(const installer::Version* installed_version, // either does not exist or can be deleted (i.e. is not locked by some other // process). if (!installed_version) { - FilePath install_path = FilePath::FromWStringHack( - installer::GetChromeInstallPath(system_install)); + std::wstring install_path(installer::GetChromeInstallPath(system_install)); if (file_util::PathExists(install_path) && !file_util::Delete(install_path, true)) { - LOG(ERROR) << "Installation directory " << install_path.value() + LOG(ERROR) << "Installation directory " << install_path << " exists and can not be deleted."; status = installer_util::INSTALL_DIR_IN_USE; int str_id = IDS_INSTALL_DIR_IN_USE_BASE; |