summaryrefslogtreecommitdiffstats
path: root/chrome/browser/first_run_win.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/first_run_win.cc')
-rw-r--r--chrome/browser/first_run_win.cc15
1 files changed, 14 insertions, 1 deletions
diff --git a/chrome/browser/first_run_win.cc b/chrome/browser/first_run_win.cc
index cc34dc1..86a79e5 100644
--- a/chrome/browser/first_run_win.cc
+++ b/chrome/browser/first_run_win.cc
@@ -205,6 +205,8 @@ class FirsRunDelayedTasks : public NotificationObserver {
} // namespace
+CommandLine* Upgrade::new_command_line_ = NULL;
+
bool FirstRun::CreateChromeDesktopShortcut() {
std::wstring chrome_exe;
if (!PathService::Get(base::FILE_EXE, &chrome_exe))
@@ -410,6 +412,18 @@ bool Upgrade::RelaunchChromeBrowser(const CommandLine& command_line) {
false, false, NULL);
}
+void Upgrade::RelaunchChromeBrowserWithNewCommandLineIfNeeded() {
+ if (new_command_line_) {
+ if (RelaunchChromeBrowser(*new_command_line_)) {
+ DLOG(ERROR) << "Launching a new instance of the browser failed.";
+ } else {
+ DLOG(WARNING) << "Launched a new instance of the browser.";
+ }
+ delete new_command_line_;
+ new_command_line_ = NULL;
+ }
+}
+
bool Upgrade::SwapNewChromeExeIfPresent() {
std::wstring new_chrome_exe;
if (!GetNewerChromeFile(&new_chrome_exe))
@@ -1020,4 +1034,3 @@ Upgrade::TryResult Upgrade::ShowTryChromeDialog(size_t version) {
TryChromeDialog td;
return td.ShowModal();
}
-