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

Unified Diff: chrome/browser/browser_shutdown.cc

Issue 2856042: [Mac] Implement the update available notification in the wrench menu. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Observe notification Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_shutdown.cc
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc
index f49f8443d3d34617cc746d79ada275c65e5782c2..dd541ef38cdcdfe064ee9da3531a5646065c17a8 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) {
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/cocoa/browser_window_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698