From e90fa89d1e52b1b081c42267cdf1bb76c8f9a0db Mon Sep 17 00:00:00 2001 From: "rsesek@chromium.org" Date: Mon, 19 Jul 2010 16:14:47 +0000 Subject: [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 --- chrome/browser/browser_shutdown.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'chrome/browser/browser_shutdown.cc') 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) { -- cgit v1.1