| 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 "chrome/browser/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 790 | 790 |
| 791 void ChromeBrowserMainParts::ToolkitInitialized() { | 791 void ChromeBrowserMainParts::ToolkitInitialized() { |
| 792 TRACE_EVENT0("startup", "ChromeBrowserMainParts::ToolkitInitialized"); | 792 TRACE_EVENT0("startup", "ChromeBrowserMainParts::ToolkitInitialized"); |
| 793 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) | 793 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) |
| 794 chrome_extra_parts_[i]->ToolkitInitialized(); | 794 chrome_extra_parts_[i]->ToolkitInitialized(); |
| 795 } | 795 } |
| 796 | 796 |
| 797 void ChromeBrowserMainParts::PreMainMessageLoopStart() { | 797 void ChromeBrowserMainParts::PreMainMessageLoopStart() { |
| 798 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopStart"); | 798 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopStart"); |
| 799 | 799 |
| 800 device_event_log::Initialize(0 /* default max entries */); | |
| 801 | |
| 802 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) | 800 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) |
| 803 chrome_extra_parts_[i]->PreMainMessageLoopStart(); | 801 chrome_extra_parts_[i]->PreMainMessageLoopStart(); |
| 804 } | 802 } |
| 805 | 803 |
| 806 void ChromeBrowserMainParts::PostMainMessageLoopStart() { | 804 void ChromeBrowserMainParts::PostMainMessageLoopStart() { |
| 807 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostMainMessageLoopStart"); | 805 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PostMainMessageLoopStart"); |
| 806 |
| 807 // device_event_log must be initialized after the message loop. Calls to |
| 808 // {DEVICE}_LOG prior to here will only be logged with VLOG. Some |
| 809 // platforms (e.g. chromeos) may have already initialized this. |
| 810 if (!device_event_log::IsInitialized()) |
| 811 device_event_log::Initialize(0 /* default max entries */); |
| 812 |
| 808 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) | 813 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) |
| 809 chrome_extra_parts_[i]->PostMainMessageLoopStart(); | 814 chrome_extra_parts_[i]->PostMainMessageLoopStart(); |
| 810 } | 815 } |
| 811 | 816 |
| 812 int ChromeBrowserMainParts::PreCreateThreads() { | 817 int ChromeBrowserMainParts::PreCreateThreads() { |
| 813 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreCreateThreads"); | 818 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreCreateThreads"); |
| 814 result_code_ = PreCreateThreadsImpl(); | 819 result_code_ = PreCreateThreadsImpl(); |
| 815 | 820 |
| 816 if (result_code_ == content::RESULT_CODE_NORMAL_EXIT) { | 821 if (result_code_ == content::RESULT_CODE_NORMAL_EXIT) { |
| 817 #if !defined(OS_ANDROID) | 822 #if !defined(OS_ANDROID) |
| (...skipping 975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1793 chromeos::CrosSettings::Shutdown(); | 1798 chromeos::CrosSettings::Shutdown(); |
| 1794 #endif // defined(OS_CHROMEOS) | 1799 #endif // defined(OS_CHROMEOS) |
| 1795 #endif // defined(OS_ANDROID) | 1800 #endif // defined(OS_ANDROID) |
| 1796 } | 1801 } |
| 1797 | 1802 |
| 1798 // Public members: | 1803 // Public members: |
| 1799 | 1804 |
| 1800 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1805 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1801 chrome_extra_parts_.push_back(parts); | 1806 chrome_extra_parts_.push_back(parts); |
| 1802 } | 1807 } |
| OLD | NEW |