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

Unified Diff: chrome/browser/browser_shutdown.cc

Issue 1520006: Mac: reform our shutdown routine. (Closed)
Patch Set: changed comment Created 10 years, 8 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/browser/browser_shutdown.h ('k') | chrome/browser/chrome_browser_application_mac.h » ('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 5d24596e729e66e8d8fcbed5e3d0e50189968231..c052790e8528f7a7ef7ab3ad8f88c7ba81c88845 100644
--- a/chrome/browser/browser_shutdown.cc
+++ b/chrome/browser/browser_shutdown.cc
@@ -41,6 +41,11 @@ using base::TimeDelta;
namespace browser_shutdown {
+#if defined(OS_MACOSX)
+// Whether the browser is trying to quit (e.g., Quit chosen from menu).
+bool g_trying_to_quit = false;
+#endif // OS_MACOSX
+
Time shutdown_started_;
ShutdownType shutdown_type_ = NOT_VALID;
int shutdown_num_processes_;
@@ -226,4 +231,14 @@ void ReadLastShutdownInfo() {
&ReadLastShutdownFile, type, num_procs, num_procs_slow));
}
+#if defined(OS_MACOSX)
+void SetTryingToQuit(bool quitting) {
+ g_trying_to_quit = quitting;
+}
+
+bool IsTryingToQuit() {
+ return g_trying_to_quit;
+}
+#endif
+
} // namespace browser_shutdown
« no previous file with comments | « chrome/browser/browser_shutdown.h ('k') | chrome/browser/chrome_browser_application_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698