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

Side by Side Diff: chrome/browser/first_run/upgrade_util_win.cc

Issue 7351003: Clean up users of a deprecated base::LaunchApp API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win-only Created 9 years, 5 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/upgrade_util.h" 5 #include "chrome/browser/first_run/upgrade_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 return false; 57 return false;
58 } 58 }
59 59
60 } // namespace 60 } // namespace
61 61
62 namespace upgrade_util { 62 namespace upgrade_util {
63 63
64 bool RelaunchChromeBrowser(const CommandLine& command_line) { 64 bool RelaunchChromeBrowser(const CommandLine& command_line) {
65 scoped_ptr<base::Environment> env(base::Environment::Create()); 65 scoped_ptr<base::Environment> env(base::Environment::Create());
66 env->UnSetVar(chrome::kChromeVersionEnvVar); 66 env->UnSetVar(chrome::kChromeVersionEnvVar);
67 return base::LaunchApp( 67 return base::LaunchProcess(command_line, base::LaunchOptions());
68 command_line.command_line_string(), false, false, NULL);
69 } 68 }
70 69
71 bool IsUpdatePendingRestart() { 70 bool IsUpdatePendingRestart() {
72 FilePath new_chrome_exe; 71 FilePath new_chrome_exe;
73 if (!GetNewerChromeFile(&new_chrome_exe)) 72 if (!GetNewerChromeFile(&new_chrome_exe))
74 return false; 73 return false;
75 return file_util::PathExists(new_chrome_exe); 74 return file_util::PathExists(new_chrome_exe);
76 } 75 }
77 76
78 bool SwapNewChromeExeIfPresent() { 77 bool SwapNewChromeExeIfPresent() {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 return false; 114 return false;
116 // At this point the chrome.exe has been swapped with the new one. 115 // At this point the chrome.exe has been swapped with the new one.
117 if (!RelaunchChromeBrowser(command_line)) { 116 if (!RelaunchChromeBrowser(command_line)) {
118 // The re-launch fails. Feel free to panic now. 117 // The re-launch fails. Feel free to panic now.
119 NOTREACHED(); 118 NOTREACHED();
120 } 119 }
121 return true; 120 return true;
122 } 121 }
123 122
124 } // namespace upgrade_util 123 } // namespace upgrade_util
OLDNEW
« no previous file with comments | « chrome/browser/first_run/upgrade_util_linux.cc ('k') | chrome/browser/process_singleton_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698