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 <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 // 2) Must be after parts_->PreCreateThreads to pick up chrome://flags. | 749 // 2) Must be after parts_->PreCreateThreads to pick up chrome://flags. |
750 GpuDataManagerImpl::GetInstance()->Initialize(); | 750 GpuDataManagerImpl::GetInstance()->Initialize(); |
751 | 751 |
752 #if !defined(OS_IOS) && (!defined(GOOGLE_CHROME_BUILD) || defined(OS_ANDROID)) | 752 #if !defined(OS_IOS) && (!defined(GOOGLE_CHROME_BUILD) || defined(OS_ANDROID)) |
753 // Single-process is an unsupported and not fully tested mode, so | 753 // Single-process is an unsupported and not fully tested mode, so |
754 // don't enable it for official Chrome builds (except on Android). | 754 // don't enable it for official Chrome builds (except on Android). |
755 if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) | 755 if (parsed_command_line_.HasSwitch(switches::kSingleProcess)) |
756 RenderProcessHost::SetRunRendererInProcess(true); | 756 RenderProcessHost::SetRunRendererInProcess(true); |
757 #endif | 757 #endif |
758 | 758 |
| 759 // parts may want to do some processing just before actually starting the |
| 760 // threads. |
| 761 if (parts_) |
| 762 parts_->PreCreateThreadsEnd(); |
| 763 |
759 return result_code_; | 764 return result_code_; |
760 } | 765 } |
761 | 766 |
762 void BrowserMainLoop::CreateStartupTasks() { | 767 void BrowserMainLoop::CreateStartupTasks() { |
763 TRACE_EVENT0("startup", "BrowserMainLoop::CreateStartupTasks"); | 768 TRACE_EVENT0("startup", "BrowserMainLoop::CreateStartupTasks"); |
764 TRACK_SCOPED_REGION("Startup", "BrowserMainLoop::CreateStartupTasks"); | 769 TRACK_SCOPED_REGION("Startup", "BrowserMainLoop::CreateStartupTasks"); |
765 | 770 |
766 // First time through, we really want to create all the tasks | 771 // First time through, we really want to create all the tasks |
767 if (!startup_task_runner_.get()) { | 772 if (!startup_task_runner_.get()) { |
768 #if defined(OS_ANDROID) | 773 #if defined(OS_ANDROID) |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1462 DCHECK(is_tracing_startup_for_duration_); | 1467 DCHECK(is_tracing_startup_for_duration_); |
1463 | 1468 |
1464 is_tracing_startup_for_duration_ = false; | 1469 is_tracing_startup_for_duration_ = false; |
1465 TracingController::GetInstance()->StopTracing( | 1470 TracingController::GetInstance()->StopTracing( |
1466 TracingController::CreateFileSink( | 1471 TracingController::CreateFileSink( |
1467 startup_trace_file_, | 1472 startup_trace_file_, |
1468 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); | 1473 base::Bind(OnStoppedStartupTracing, startup_trace_file_))); |
1469 } | 1474 } |
1470 | 1475 |
1471 } // namespace content | 1476 } // namespace content |
OLD | NEW |