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 |