Chromium Code Reviews| 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 #ifndef CHROME_BROWSER_BROWSER_SHUTDOWN_H_ | 5 #ifndef CHROME_BROWSER_BROWSER_SHUTDOWN_H_ |
| 6 #define CHROME_BROWSER_BROWSER_SHUTDOWN_H_ | 6 #define CHROME_BROWSER_BROWSER_SHUTDOWN_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 class PrefRegistrySimple; | 10 class PrefRegistrySimple; |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 }; | 26 }; |
| 27 | 27 |
| 28 enum ShutdownType { | 28 enum ShutdownType { |
| 29 // an uninitialized value | 29 // an uninitialized value |
| 30 NOT_VALID = 0, | 30 NOT_VALID = 0, |
| 31 // the last browser window was closed | 31 // the last browser window was closed |
| 32 WINDOW_CLOSE, | 32 WINDOW_CLOSE, |
| 33 // user clicked on the Exit menu item | 33 // user clicked on the Exit menu item |
| 34 BROWSER_EXIT, | 34 BROWSER_EXIT, |
| 35 // windows is logging off or shutting down | 35 // windows is logging off or shutting down |
| 36 END_SESSION | 36 END_SESSION, |
| 37 // This value should always be the last element of this enum. | |
| 38 SHUTDOWN_TYPE_MAX_VALUE, | |
|
sky
2016/09/09 15:40:56
I'm not a fan of this style. It means the enum has
hashimoto
2016/09/12 05:10:18
Sounds good.
Done.
| |
| 37 }; | 39 }; |
| 38 | 40 |
| 39 void RegisterPrefs(PrefRegistrySimple* registry); | 41 void RegisterPrefs(PrefRegistrySimple* registry); |
| 40 | 42 |
| 41 // Called when the browser starts shutting down so that we can measure shutdown | 43 // Called when the browser starts shutting down so that we can measure shutdown |
| 42 // time. | 44 // time. |
| 43 void OnShutdownStarting(ShutdownType type); | 45 void OnShutdownStarting(ShutdownType type); |
| 44 | 46 |
| 45 // Get the current shutdown type. | 47 // Get the current shutdown type. |
| 46 ShutdownType GetShutdownType(); | 48 ShutdownType GetShutdownType(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 84 bool IsTryingToQuit(); | 86 bool IsTryingToQuit(); |
| 85 | 87 |
| 86 // Starts to collect shutdown traces. On ChromeOS this will start immediately | 88 // Starts to collect shutdown traces. On ChromeOS this will start immediately |
| 87 // on AttemptUserExit() and all other systems will start once all tabs are | 89 // on AttemptUserExit() and all other systems will start once all tabs are |
| 88 // closed. | 90 // closed. |
| 89 void StartShutdownTracing(); | 91 void StartShutdownTracing(); |
| 90 | 92 |
| 91 } // namespace browser_shutdown | 93 } // namespace browser_shutdown |
| 92 | 94 |
| 93 #endif // CHROME_BROWSER_BROWSER_SHUTDOWN_H_ | 95 #endif // CHROME_BROWSER_BROWSER_SHUTDOWN_H_ |
| OLD | NEW |