| Index: chrome/browser/first_run/upgrade_util.cc
|
| diff --git a/chrome/browser/first_run/upgrade_util.cc b/chrome/browser/first_run/upgrade_util.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..7e700aa95c44122a622a4d90a42c083e67625775
|
| --- /dev/null
|
| +++ b/chrome/browser/first_run/upgrade_util.cc
|
| @@ -0,0 +1,34 @@
|
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/first_run/upgrade_util.h"
|
| +
|
| +#include "base/command_line.h"
|
| +#include "base/logging.h"
|
| +
|
| +namespace {
|
| +
|
| +CommandLine* command_line;
|
| +
|
| +} // namespace
|
| +
|
| +namespace upgrade_util {
|
| +
|
| +void SetNewCommandLine(CommandLine* new_command_line) {
|
| + command_line = new_command_line;
|
| +}
|
| +
|
| +void RelaunchChromeBrowserWithNewCommandLineIfNeeded() {
|
| + if (command_line) {
|
| + if (!RelaunchChromeBrowser(*command_line)) {
|
| + DLOG(ERROR) << "Launching a new instance of the browser failed.";
|
| + } else {
|
| + DLOG(WARNING) << "Launched a new instance of the browser.";
|
| + }
|
| + delete command_line;
|
| + command_line = NULL;
|
| + }
|
| +}
|
| +
|
| +} // namespace upgrade_util
|
|
|