Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #include "content/public/browser/browser_main_runner.h" | 5 #include "content/public/browser/browser_main_runner.h" |
| 6 | 6 |
| 7 #include "base/allocator/allocator_shim.h" | 7 #include "base/allocator/allocator_shim.h" |
| 8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 | 95 |
| 96 #if defined(OS_WIN) && !defined(NO_TCMALLOC) | 96 #if defined(OS_WIN) && !defined(NO_TCMALLOC) |
| 97 // When linking shared libraries, NO_TCMALLOC is defined, and dynamic | 97 // When linking shared libraries, NO_TCMALLOC is defined, and dynamic |
| 98 // allocator selection is not supported. | 98 // allocator selection is not supported. |
| 99 | 99 |
| 100 // Make this call before going multithreaded, or spawning any subprocesses. | 100 // Make this call before going multithreaded, or spawning any subprocesses. |
| 101 base::allocator::SetupSubprocessAllocator(); | 101 base::allocator::SetupSubprocessAllocator(); |
| 102 #endif | 102 #endif |
| 103 ui::InitializeInputMethod(); | 103 ui::InitializeInputMethod(); |
| 104 | 104 |
| 105 main_loop_->CreateThreads(); | 105 main_loop_->CreateStartupTasks(); |
| 106 int result_code = main_loop_->GetResultCode(); | 106 int result_code = main_loop_->GetResultCode(); |
| 107 if (result_code > 0) | 107 if (result_code > 0) |
| 108 return result_code; | 108 return result_code; |
| 109 created_threads_ = true; | 109 created_threads_ = true; |
|
Yaron
2013/07/30 00:06:24
It seems like this is no longer correct. In the as
aberent
2013/07/30 15:01:54
This is only used to decide whether to call Browse
| |
| 110 | 110 |
| 111 // Return -1 to indicate no early termination. | 111 // Return -1 to indicate no early termination. |
| 112 return -1; | 112 return -1; |
| 113 } | 113 } |
| 114 | 114 |
| 115 virtual int Run() OVERRIDE { | 115 virtual int Run() OVERRIDE { |
| 116 DCHECK(is_initialized_); | 116 DCHECK(is_initialized_); |
| 117 DCHECK(!is_shutdown_); | 117 DCHECK(!is_shutdown_); |
| 118 main_loop_->RunMainMessageLoopParts(); | 118 main_loop_->RunMainMessageLoopParts(); |
| 119 return main_loop_->GetResultCode(); | 119 return main_loop_->GetResultCode(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 | 157 |
| 158 DISALLOW_COPY_AND_ASSIGN(BrowserMainRunnerImpl); | 158 DISALLOW_COPY_AND_ASSIGN(BrowserMainRunnerImpl); |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 // static | 161 // static |
| 162 BrowserMainRunner* BrowserMainRunner::Create() { | 162 BrowserMainRunner* BrowserMainRunner::Create() { |
| 163 return new BrowserMainRunnerImpl(); | 163 return new BrowserMainRunnerImpl(); |
| 164 } | 164 } |
| 165 | 165 |
| 166 } // namespace content | 166 } // namespace content |
| OLD | NEW |