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

Side by Side Diff: chrome/browser/first_run_win.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/file_util.cc ('k') | chrome/browser/importer/firefox2_importer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/first_run.h" 5 #include "chrome/browser/first_run.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 10
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 bool Upgrade::RelaunchChromeBrowser(const CommandLine& command_line) { 304 bool Upgrade::RelaunchChromeBrowser(const CommandLine& command_line) {
305 ::SetEnvironmentVariable(google_update::kEnvProductVersionKey, NULL); 305 ::SetEnvironmentVariable(google_update::kEnvProductVersionKey, NULL);
306 return base::LaunchApp(command_line.command_line_string(), 306 return base::LaunchApp(command_line.command_line_string(),
307 false, false, NULL); 307 false, false, NULL);
308 } 308 }
309 309
310 bool Upgrade::SwapNewChromeExeIfPresent() { 310 bool Upgrade::SwapNewChromeExeIfPresent() {
311 std::wstring new_chrome_exe; 311 std::wstring new_chrome_exe;
312 if (!GetNewerChromeFile(&new_chrome_exe)) 312 if (!GetNewerChromeFile(&new_chrome_exe))
313 return false; 313 return false;
314 if (!file_util::PathExists(new_chrome_exe)) 314 if (!file_util::PathExists(FilePath::FromWStringHack(new_chrome_exe)))
315 return false; 315 return false;
316 std::wstring curr_chrome_exe; 316 std::wstring curr_chrome_exe;
317 if (!PathService::Get(base::FILE_EXE, &curr_chrome_exe)) 317 if (!PathService::Get(base::FILE_EXE, &curr_chrome_exe))
318 return false; 318 return false;
319 319
320 // First try to rename exe by launching rename command ourselves. 320 // First try to rename exe by launching rename command ourselves.
321 bool user_install = InstallUtil::IsPerUserInstall(curr_chrome_exe.c_str()); 321 bool user_install = InstallUtil::IsPerUserInstall(curr_chrome_exe.c_str());
322 HKEY reg_root = user_install ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE; 322 HKEY reg_root = user_install ? HKEY_CURRENT_USER : HKEY_LOCAL_MACHINE;
323 BrowserDistribution *dist = BrowserDistribution::GetDistribution(); 323 BrowserDistribution *dist = BrowserDistribution::GetDistribution();
324 RegKey key; 324 RegKey key;
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
922 922
923 DISALLOW_COPY_AND_ASSIGN(TryChromeDialog); 923 DISALLOW_COPY_AND_ASSIGN(TryChromeDialog);
924 }; 924 };
925 925
926 } // namespace 926 } // namespace
927 927
928 Upgrade::TryResult Upgrade::ShowTryChromeDialog(size_t version) { 928 Upgrade::TryResult Upgrade::ShowTryChromeDialog(size_t version) {
929 TryChromeDialog td(version); 929 TryChromeDialog td(version);
930 return td.ShowModal(); 930 return td.ShowModal();
931 } 931 }
OLDNEW
« no previous file with comments | « base/file_util.cc ('k') | chrome/browser/importer/firefox2_importer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698