summaryrefslogtreecommitdiffstats
path: root/content/browser/browser_main_loop.cc
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-06 18:46:35 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-06 18:46:35 +0000
commit9e49959b0e6e940c39359f5f05f9d5da6032a869 (patch)
treea1059820b0bf8129bcf571966891ce122453465e /content/browser/browser_main_loop.cc
parent4a8e0f3d4b33c1b69021575d7b971da7b17340ae (diff)
downloadchromium_src-9e49959b0e6e940c39359f5f05f9d5da6032a869.zip
chromium_src-9e49959b0e6e940c39359f5f05f9d5da6032a869.tar.gz
chromium_src-9e49959b0e6e940c39359f5f05f9d5da6032a869.tar.bz2
Revert "Support sharing of ContentMain and BrowserMain code with embedded use cases."
This reverts commit r120574. Test failures. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120581 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/browser_main_loop.cc')
-rw-r--r--content/browser/browser_main_loop.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 6a9e38c..563c310 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -294,9 +294,7 @@ void BrowserMainLoop::MainMessageLoopStart() {
// Must first NULL pointer or we hit a DCHECK that the newly constructed
// message loop is the current one.
main_message_loop_.reset();
- main_message_loop_.reset(parts_->GetMainMessageLoop());
- if (!main_message_loop_.get())
- main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI));
+ main_message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI));
InitializeMainThread();
@@ -323,7 +321,8 @@ void BrowserMainLoop::MainMessageLoopStart() {
parts_->PostMainMessageLoopStart();
}
-void BrowserMainLoop::CreateThreads() {
+void BrowserMainLoop::RunMainMessageLoopParts(
+ bool* completed_main_message_loop) {
if (parts_.get())
result_code_ = parts_->PreCreateThreads();
@@ -405,13 +404,10 @@ void BrowserMainLoop::CreateThreads() {
if (parts_.get())
parts_->PreMainMessageLoopRun();
+ TRACE_EVENT_BEGIN_ETW("BrowserMain:MESSAGE_LOOP", 0, "");
// If the UI thread blocks, the whole UI is unresponsive.
// Do not allow disk IO from the UI thread.
base::ThreadRestrictions::SetIOAllowed(false);
-}
-
-void BrowserMainLoop::RunMainMessageLoopParts() {
- TRACE_EVENT_BEGIN_ETW("BrowserMain:MESSAGE_LOOP", 0, "");
bool ran_main_loop = false;
if (parts_.get())
@@ -421,6 +417,11 @@ void BrowserMainLoop::RunMainMessageLoopParts() {
MainMessageLoopRun();
TRACE_EVENT_END_ETW("BrowserMain:MESSAGE_LOOP", 0, "");
+
+ if (completed_main_message_loop)
+ *completed_main_message_loop = true;
+
+ ShutdownThreadsAndCleanUp();
}
void BrowserMainLoop::ShutdownThreadsAndCleanUp() {