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