| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/browser_shutdown.h" | 5 #include "chrome/browser/browser_shutdown.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 using base::Time; | 55 using base::Time; |
| 56 using base::TimeDelta; | 56 using base::TimeDelta; |
| 57 using content::BrowserThread; | 57 using content::BrowserThread; |
| 58 | 58 |
| 59 namespace browser_shutdown { | 59 namespace browser_shutdown { |
| 60 namespace { | 60 namespace { |
| 61 | 61 |
| 62 // Whether the browser is trying to quit (e.g., Quit chosen from menu). | 62 // Whether the browser is trying to quit (e.g., Quit chosen from menu). |
| 63 bool g_trying_to_quit = false; | 63 bool g_trying_to_quit = false; |
| 64 | 64 |
| 65 // Whether the browser should quit without closing browsers. | |
| 66 bool g_shutting_down_without_closing_browsers = false; | |
| 67 | |
| 68 #if defined(OS_WIN) | 65 #if defined(OS_WIN) |
| 69 upgrade_util::RelaunchMode g_relaunch_mode = | 66 upgrade_util::RelaunchMode g_relaunch_mode = |
| 70 upgrade_util::RELAUNCH_MODE_DEFAULT; | 67 upgrade_util::RELAUNCH_MODE_DEFAULT; |
| 71 #endif | 68 #endif |
| 72 | 69 |
| 73 Time* shutdown_started_ = NULL; | 70 Time* shutdown_started_ = NULL; |
| 74 ShutdownType shutdown_type_ = NOT_VALID; | 71 ShutdownType shutdown_type_ = NOT_VALID; |
| 75 int shutdown_num_processes_; | 72 int shutdown_num_processes_; |
| 76 int shutdown_num_processes_slow_; | 73 int shutdown_num_processes_slow_; |
| 77 | 74 |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 } | 336 } |
| 340 | 337 |
| 341 void SetTryingToQuit(bool quitting) { | 338 void SetTryingToQuit(bool quitting) { |
| 342 g_trying_to_quit = quitting; | 339 g_trying_to_quit = quitting; |
| 343 } | 340 } |
| 344 | 341 |
| 345 bool IsTryingToQuit() { | 342 bool IsTryingToQuit() { |
| 346 return g_trying_to_quit; | 343 return g_trying_to_quit; |
| 347 } | 344 } |
| 348 | 345 |
| 349 bool ShuttingDownWithoutClosingBrowsers() { | |
| 350 return g_shutting_down_without_closing_browsers; | |
| 351 } | |
| 352 | |
| 353 void SetShuttingDownWithoutClosingBrowsers(bool without_close) { | |
| 354 g_shutting_down_without_closing_browsers = without_close; | |
| 355 } | |
| 356 | |
| 357 } // namespace browser_shutdown | 346 } // namespace browser_shutdown |
| OLD | NEW |