Chromium Code Reviews| Index: content/public/browser/browser_shutdown.h |
| diff --git a/content/public/browser/browser_shutdown.h b/content/public/browser/browser_shutdown.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..cdea4dcd290cff82ef7a814a2cd6905f671007f7 |
| --- /dev/null |
| +++ b/content/public/browser/browser_shutdown.h |
| @@ -0,0 +1,34 @@ |
| +// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_PUBLIC_BROWSER_BROWSER_SHUTDOWN_H_ |
| +#define CONTENT_PUBLIC_BROWSER_BROWSER_SHUTDOWN_H_ |
| +#pragma once |
| + |
| +#include "content/common/content_export.h" |
| + |
| +namespace content { |
| +namespace browser_shutdown { |
| + |
| +// This can be used for as-fast-as-possible shutdown, in cases where |
| +// time for shutdown is limited and we just need to write out as much |
| +// data as possible before our time runs out. |
| +// |
| +// This causes the shutdown sequence embodied by |
| +// BrowserMainParts::PostMainMessageLoopRun through |
| +// BrowserMainParts::FinalCleanup to occur, i.e. we pretend the |
| +// message loop finished, all threads are stopped in sequence and |
| +// PreStopThread/PostStopThread gets called, and at least, |
| +// FinalCleanup is called. |
| +// |
| +// As this violates the normal order of shutdown, likely leaving the |
| +// process in a bad state, the last thing this function does is |
| +// terminate the process (right after calling |
| +// BrowserMainParts::FinalCleanup). |
| +CONTENT_EXPORT void ImmediateShutdownAndExitProcess(); |
|
jam
2011/11/23 18:30:56
nit: can we put this as a static function in Brows
Jói
2011/11/23 22:13:39
As discussed, we don't plan to make BMP public. R
|
| + |
| +} // namespace browser_shutdown |
| +} // namespace content |
| + |
| +#endif // CONTENT_PUBLIC_BROWSER_BROWSER_SHUTDOWN_H_ |