summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_shutdown.cc
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-19 16:14:47 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-19 16:14:47 +0000
commite90fa89d1e52b1b081c42267cdf1bb76c8f9a0db (patch)
treec571c898d7dcbc53d3bb289fa93d29a67c84df0b /chrome/browser/browser_shutdown.cc
parent652725dca523e36d14e6cf98d6e9fcf3a1db822c (diff)
downloadchromium_src-e90fa89d1e52b1b081c42267cdf1bb76c8f9a0db.zip
chromium_src-e90fa89d1e52b1b081c42267cdf1bb76c8f9a0db.tar.gz
chromium_src-e90fa89d1e52b1b081c42267cdf1bb76c8f9a0db.tar.bz2
[Mac] Implement the update available notification in the wrench menu.
The changes to restart_browser.mm also affect the sheet displayed in the About window. Note that the badge on the wrench menu looks bad. BUG=45147 TEST=difficult Review URL: http://codereview.chromium.org/2856042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52911 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_shutdown.cc')
-rw-r--r--chrome/browser/browser_shutdown.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc
index f49f844..dd541ef 100644
--- a/chrome/browser/browser_shutdown.cc
+++ b/chrome/browser/browser_shutdown.cc
@@ -11,6 +11,7 @@
#include "base/file_util.h"
#include "base/histogram.h"
#include "base/path_service.h"
+#include "base/process_util.h"
#include "base/string_util.h"
#include "base/thread.h"
#include "base/time.h"
@@ -164,16 +165,24 @@ void Shutdown() {
#endif
if (restart_last_session) {
-#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+#if !defined(OS_CHROMEOS)
// Make sure to relaunch the browser with the same command line and add
// Restore Last Session flag if session restore is not set.
CommandLine command_line(*CommandLine::ForCurrentProcess());
if (!command_line.HasSwitch(switches::kRestoreLastSession))
command_line.AppendSwitch(switches::kRestoreLastSession);
+#if defined(OS_WIN) || defined(OS_LINUX)
Upgrade::RelaunchChromeBrowser(command_line);
+#endif // defined(OS_WIN) || defined(OS_LINUX)
+
+#if defined(OS_MACOSX)
+ command_line.AppendSwitch(switches::kActivateOnLaunch);
+ base::LaunchApp(command_line, false, false, NULL);
+#endif // defined(OS_MACOSX)
+
#else
NOTIMPLEMENTED();
-#endif
+#endif // !defined(OS_CHROMEOS)
}
if (shutdown_type_ > NOT_VALID && shutdown_num_processes_ > 0) {