summaryrefslogtreecommitdiffstats
path: root/chrome/browser/first_run_win.cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-31 03:28:50 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-31 03:28:50 +0000
commitb474ef25d6fe1f2df2949dcdead2a8cf3462c4de (patch)
tree2f7c95923656d7fb1dde3a68b472f44aec0057b8 /chrome/browser/first_run_win.cc
parentbd883b833f20d010ba6682a2bf7e780240d909b3 (diff)
downloadchromium_src-b474ef25d6fe1f2df2949dcdead2a8cf3462c4de.zip
chromium_src-b474ef25d6fe1f2df2949dcdead2a8cf3462c4de.tar.gz
chromium_src-b474ef25d6fe1f2df2949dcdead2a8cf3462c4de.tar.bz2
Remove more occurrences of FromWStringHack from code base.
BUG=24672 TEST=trybots Review URL: http://codereview.chromium.org/2401001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48584 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/first_run_win.cc')
-rw-r--r--chrome/browser/first_run_win.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/first_run_win.cc b/chrome/browser/first_run_win.cc
index a93a16c..4858871 100644
--- a/chrome/browser/first_run_win.cc
+++ b/chrome/browser/first_run_win.cc
@@ -75,10 +75,10 @@
namespace {
-bool GetNewerChromeFile(std::wstring* path) {
+bool GetNewerChromeFile(FilePath* path) {
if (!PathService::Get(base::DIR_EXE, path))
return false;
- file_util::AppendToPath(path, installer_util::kChromeNewExe);
+ *path = path->Append(installer_util::kChromeNewExe);
return true;
}
@@ -422,10 +422,10 @@ void Upgrade::RelaunchChromeBrowserWithNewCommandLineIfNeeded() {
}
bool Upgrade::SwapNewChromeExeIfPresent() {
- std::wstring new_chrome_exe;
+ FilePath new_chrome_exe;
if (!GetNewerChromeFile(&new_chrome_exe))
return false;
- if (!file_util::PathExists(FilePath::FromWStringHack(new_chrome_exe)))
+ if (!file_util::PathExists(new_chrome_exe))
return false;
std::wstring curr_chrome_exe;
if (!PathService::Get(base::FILE_EXE, &curr_chrome_exe))
@@ -458,7 +458,7 @@ bool Upgrade::SwapNewChromeExeIfPresent() {
std::wstring backup_exe;
if (!GetBackupChromeFile(&backup_exe))
return false;
- if (::ReplaceFileW(curr_chrome_exe.c_str(), new_chrome_exe.c_str(),
+ if (::ReplaceFileW(curr_chrome_exe.c_str(), new_chrome_exe.value().c_str(),
backup_exe.c_str(), REPLACEFILE_IGNORE_MERGE_ERRORS,
NULL, NULL)) {
return true;
@@ -480,10 +480,10 @@ bool Upgrade::DoUpgradeTasks(const CommandLine& command_line) {
// static
bool Upgrade::IsUpdatePendingRestart() {
- std::wstring new_chrome_exe;
+ FilePath new_chrome_exe;
if (!GetNewerChromeFile(&new_chrome_exe))
return false;
- return file_util::PathExists(FilePath::FromWStringHack(new_chrome_exe));
+ return file_util::PathExists(new_chrome_exe);
}
bool OpenFirstRunDialog(Profile* profile,