| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <set> | 10 #include <set> |
| (...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1216 // * Near the end of |PreCreateThreads()|: The TaskScheduler needs to be | 1216 // * Near the end of |PreCreateThreads()|: The TaskScheduler needs to be |
| 1217 // created before any other threads are (by contract) but it creates | 1217 // created before any other threads are (by contract) but it creates |
| 1218 // threads itself so instantiating it earlier is also incorrect. | 1218 // threads itself so instantiating it earlier is also incorrect. |
| 1219 // To maintain scoping symmetry, if this line is moved, the corresponding | 1219 // To maintain scoping symmetry, if this line is moved, the corresponding |
| 1220 // shutdown call may also need to be moved. | 1220 // shutdown call may also need to be moved. |
| 1221 task_scheduler_util::InitializeDefaultBrowserTaskScheduler(); | 1221 task_scheduler_util::InitializeDefaultBrowserTaskScheduler(); |
| 1222 | 1222 |
| 1223 SetupMetrics(); | 1223 SetupMetrics(); |
| 1224 | 1224 |
| 1225 // ChromeOS needs ResourceBundle::InitSharedInstance to be called before this. | 1225 // ChromeOS needs ResourceBundle::InitSharedInstance to be called before this. |
| 1226 // This also instantiates the IOThread which requests the metrics service and | |
| 1227 // must be after |SetupMetrics()|. | |
| 1228 browser_process_->PreCreateThreads(); | 1226 browser_process_->PreCreateThreads(); |
| 1229 | 1227 |
| 1230 return content::RESULT_CODE_NORMAL_EXIT; | 1228 return content::RESULT_CODE_NORMAL_EXIT; |
| 1231 } | 1229 } |
| 1232 | 1230 |
| 1233 void ChromeBrowserMainParts::ServiceManagerConnectionStarted( | 1231 void ChromeBrowserMainParts::ServiceManagerConnectionStarted( |
| 1234 content::ServiceManagerConnection* connection) { | 1232 content::ServiceManagerConnection* connection) { |
| 1235 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) | 1233 for (size_t i = 0; i < chrome_extra_parts_.size(); ++i) |
| 1236 chrome_extra_parts_[i]->ServiceManagerConnectionStarted(connection); | 1234 chrome_extra_parts_[i]->ServiceManagerConnectionStarted(connection); |
| 1237 } | 1235 } |
| (...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2092 chromeos::CrosSettings::Shutdown(); | 2090 chromeos::CrosSettings::Shutdown(); |
| 2093 #endif // defined(OS_CHROMEOS) | 2091 #endif // defined(OS_CHROMEOS) |
| 2094 #endif // defined(OS_ANDROID) | 2092 #endif // defined(OS_ANDROID) |
| 2095 } | 2093 } |
| 2096 | 2094 |
| 2097 // Public members: | 2095 // Public members: |
| 2098 | 2096 |
| 2099 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2097 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2100 chrome_extra_parts_.push_back(parts); | 2098 chrome_extra_parts_.push_back(parts); |
| 2101 } | 2099 } |
| OLD | NEW |