Commit c896c5c1 authored by hashimoto's avatar hashimoto Committed by Commit bot

Remove unused ImmediateShutdownAndExitProcess()

This function was used only in application_lifetime.cc.
Since http://crrev.com/307026, this function has been unused.

BUG=None

Review URL: https://codereview.chromium.org/1138863003

Cr-Commit-Position: refs/heads/master@{#330280}
parent 122d247a
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "content/public/browser/browser_shutdown.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/navigation_details.h" #include "content/public/browser/navigation_details.h"
#include "content/public/browser/notification_service.h" #include "content/public/browser/notification_service.h"
......
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
#include "content/common/host_discardable_shared_memory_manager.h" #include "content/common/host_discardable_shared_memory_manager.h"
#include "content/common/host_shared_bitmap_manager.h" #include "content/common/host_shared_bitmap_manager.h"
#include "content/public/browser/browser_main_parts.h" #include "content/public/browser/browser_main_parts.h"
#include "content/public/browser/browser_shutdown.h"
#include "content/public/browser/content_browser_client.h" #include "content/public/browser/content_browser_client.h"
#include "content/public/browser/render_process_host.h" #include "content/public/browser/render_process_host.h"
#include "content/public/browser/tracing_controller.h" #include "content/public/browser/tracing_controller.h"
...@@ -336,30 +335,6 @@ base::win::MemoryPressureMonitor* CreateWinMemoryPressureMonitor( ...@@ -336,30 +335,6 @@ base::win::MemoryPressureMonitor* CreateWinMemoryPressureMonitor(
// The currently-running BrowserMainLoop. There can be one or zero. // The currently-running BrowserMainLoop. There can be one or zero.
BrowserMainLoop* g_current_browser_main_loop = NULL; BrowserMainLoop* g_current_browser_main_loop = NULL;
// This is just to be able to keep ShutdownThreadsAndCleanUp out of
// the public interface of BrowserMainLoop.
class BrowserShutdownImpl {
public:
static void ImmediateShutdownAndExitProcess() {
DCHECK(g_current_browser_main_loop);
g_current_browser_main_loop->ShutdownThreadsAndCleanUp();
#if defined(OS_WIN)
// At this point the message loop is still running yet we've shut everything
// down. If any messages are processed we'll likely crash. Exit now.
ExitProcess(RESULT_CODE_NORMAL_EXIT);
#elif defined(OS_POSIX) && !defined(OS_MACOSX)
_exit(RESULT_CODE_NORMAL_EXIT);
#else
NOTIMPLEMENTED();
#endif
}
};
void ImmediateShutdownAndExitProcess() {
BrowserShutdownImpl::ImmediateShutdownAndExitProcess();
}
// For measuring memory usage after each task. Behind a command line flag. // For measuring memory usage after each task. Behind a command line flag.
class BrowserMainLoop::MemoryObserver : public base::MessageLoop::TaskObserver { class BrowserMainLoop::MemoryObserver : public base::MessageLoop::TaskObserver {
public: public:
......
...@@ -91,7 +91,6 @@ ...@@ -91,7 +91,6 @@
'public/browser/browser_plugin_guest_manager.cc', 'public/browser/browser_plugin_guest_manager.cc',
'public/browser/browser_plugin_guest_manager.h', 'public/browser/browser_plugin_guest_manager.h',
'public/browser/browser_ppapi_host.h', 'public/browser/browser_ppapi_host.h',
'public/browser/browser_shutdown.h',
'public/browser/browser_thread.h', 'public/browser/browser_thread.h',
'public/browser/browser_thread_delegate.h', 'public/browser/browser_thread_delegate.h',
'public/browser/browser_url_handler.h', 'public/browser/browser_url_handler.h',
......
// Copyright (c) 2012 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_
#include "content/common/content_export.h"
namespace content {
// 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::PostDestroyThreads to occur, i.e. we pretend the
// message loop finished, all threads are stopped in sequence and then
// PostDestroyThreads 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::PostDestroyThreads).
CONTENT_EXPORT void ImmediateShutdownAndExitProcess();
} // namespace content
#endif // CONTENT_PUBLIC_BROWSER_BROWSER_SHUTDOWN_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment