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