| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 bool g_mode_switch = false; | 71 bool g_mode_switch = false; |
| 72 #endif | 72 #endif |
| 73 | 73 |
| 74 Time* shutdown_started_ = NULL; | 74 Time* shutdown_started_ = NULL; |
| 75 ShutdownType shutdown_type_ = NOT_VALID; | 75 ShutdownType shutdown_type_ = NOT_VALID; |
| 76 int shutdown_num_processes_; | 76 int shutdown_num_processes_; |
| 77 int shutdown_num_processes_slow_; | 77 int shutdown_num_processes_slow_; |
| 78 | 78 |
| 79 const char kShutdownMsFile[] = "chrome_shutdown_ms.txt"; | 79 const char kShutdownMsFile[] = "chrome_shutdown_ms.txt"; |
| 80 | 80 |
| 81 void RegisterPrefs(PrefService* local_state) { | 81 void RegisterPrefs(PrefServiceSimple* local_state) { |
| 82 local_state->RegisterIntegerPref(prefs::kShutdownType, NOT_VALID); | 82 local_state->RegisterIntegerPref(prefs::kShutdownType, NOT_VALID); |
| 83 local_state->RegisterIntegerPref(prefs::kShutdownNumProcesses, 0); | 83 local_state->RegisterIntegerPref(prefs::kShutdownNumProcesses, 0); |
| 84 local_state->RegisterIntegerPref(prefs::kShutdownNumProcessesSlow, 0); | 84 local_state->RegisterIntegerPref(prefs::kShutdownNumProcessesSlow, 0); |
| 85 } | 85 } |
| 86 | 86 |
| 87 ShutdownType GetShutdownType() { | 87 ShutdownType GetShutdownType() { |
| 88 return shutdown_type_; | 88 return shutdown_type_; |
| 89 } | 89 } |
| 90 | 90 |
| 91 void OnShutdownStarting(ShutdownType type) { | 91 void OnShutdownStarting(ShutdownType type) { |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 | 331 |
| 332 bool ShuttingDownWithoutClosingBrowsers() { | 332 bool ShuttingDownWithoutClosingBrowsers() { |
| 333 return g_shutting_down_without_closing_browsers; | 333 return g_shutting_down_without_closing_browsers; |
| 334 } | 334 } |
| 335 | 335 |
| 336 void SetShuttingDownWithoutClosingBrowsers(bool without_close) { | 336 void SetShuttingDownWithoutClosingBrowsers(bool without_close) { |
| 337 g_shutting_down_without_closing_browsers = without_close; | 337 g_shutting_down_without_closing_browsers = without_close; |
| 338 } | 338 } |
| 339 | 339 |
| 340 } // namespace browser_shutdown | 340 } // namespace browser_shutdown |
| OLD | NEW |