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/browser/browser_main_loop.h" | 5 #include "content/browser/browser_main_loop.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 case BrowserThread::ID_COUNT: | 709 case BrowserThread::ID_COUNT: |
710 default: | 710 default: |
711 NOTREACHED(); | 711 NOTREACHED(); |
712 break; | 712 break; |
713 } | 713 } |
714 | 714 |
715 BrowserThread::ID id = static_cast<BrowserThread::ID>(thread_id); | 715 BrowserThread::ID id = static_cast<BrowserThread::ID>(thread_id); |
716 | 716 |
717 if (thread_to_start) { | 717 if (thread_to_start) { |
718 (*thread_to_start).reset(new BrowserProcessSubThread(id)); | 718 (*thread_to_start).reset(new BrowserProcessSubThread(id)); |
719 (*thread_to_start)->StartWithOptions(options); | 719 if (!(*thread_to_start)->StartWithOptions(options)) { |
| 720 LOG(FATAL) << "Failed to start the browser thread: id == " << id; |
| 721 } |
720 } else { | 722 } else { |
721 NOTREACHED(); | 723 NOTREACHED(); |
722 } | 724 } |
723 | 725 |
724 TRACE_EVENT_END0("startup", "BrowserMainLoop::CreateThreads:start"); | 726 TRACE_EVENT_END0("startup", "BrowserMainLoop::CreateThreads:start"); |
725 } | 727 } |
726 created_threads_ = true; | 728 created_threads_ = true; |
727 return result_code_; | 729 return result_code_; |
728 } | 730 } |
729 | 731 |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1194 &BrowserMainLoop::EndStartupTracing); | 1196 &BrowserMainLoop::EndStartupTracing); |
1195 } | 1197 } |
1196 | 1198 |
1197 void BrowserMainLoop::EndStartupTracing() { | 1199 void BrowserMainLoop::EndStartupTracing() { |
1198 is_tracing_startup_ = false; | 1200 is_tracing_startup_ = false; |
1199 TracingController::GetInstance()->DisableRecording( | 1201 TracingController::GetInstance()->DisableRecording( |
1200 startup_trace_file_, base::Bind(&OnStoppedStartupTracing)); | 1202 startup_trace_file_, base::Bind(&OnStoppedStartupTracing)); |
1201 } | 1203 } |
1202 | 1204 |
1203 } // namespace content | 1205 } // namespace content |
OLD | NEW |