OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_PUBLIC_BROWSER_BROWSER_SHUTDOWN_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_SHUTDOWN_H_ |
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_SHUTDOWN_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_SHUTDOWN_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 | 10 |
11 namespace content { | 11 namespace content { |
12 | 12 |
13 // This can be used for as-fast-as-possible shutdown, in cases where | 13 // This can be used for as-fast-as-possible shutdown, in cases where |
14 // time for shutdown is limited and we just need to write out as much | 14 // time for shutdown is limited and we just need to write out as much |
15 // data as possible before our time runs out. | 15 // data as possible before our time runs out. |
16 // | 16 // |
17 // This causes the shutdown sequence embodied by | 17 // This causes the shutdown sequence embodied by |
18 // BrowserMainParts::PostMainMessageLoopRun through | 18 // BrowserMainParts::PostMainMessageLoopRun through |
19 // BrowserMainParts::PostDestroyThreads to occur, i.e. we pretend the | 19 // BrowserMainParts::PostDestroyThreads to occur, i.e. we pretend the |
20 // message loop finished, all threads are stopped in sequence and | 20 // message loop finished, all threads are stopped in sequence and then |
21 // PreStopThread/PostStopThread gets called, and at least, | |
22 // PostDestroyThreads is called. | 21 // PostDestroyThreads is called. |
23 // | 22 // |
24 // As this violates the normal order of shutdown, likely leaving the | 23 // As this violates the normal order of shutdown, likely leaving the |
25 // process in a bad state, the last thing this function does is | 24 // process in a bad state, the last thing this function does is |
26 // terminate the process (right after calling | 25 // terminate the process (right after calling |
27 // BrowserMainParts::PostDestroyThreads). | 26 // BrowserMainParts::PostDestroyThreads). |
28 CONTENT_EXPORT void ImmediateShutdownAndExitProcess(); | 27 CONTENT_EXPORT void ImmediateShutdownAndExitProcess(); |
29 | 28 |
30 } // namespace content | 29 } // namespace content |
31 | 30 |
32 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_SHUTDOWN_H_ | 31 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_SHUTDOWN_H_ |
OLD | NEW |