| 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 <algorithm> | 10 #include <algorithm> |
| (...skipping 1315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1326 | 1326 |
| 1327 device::GeolocationProvider::SetGeolocationDelegate( | 1327 device::GeolocationProvider::SetGeolocationDelegate( |
| 1328 new ChromeGeolocationDelegate()); | 1328 new ChromeGeolocationDelegate()); |
| 1329 | 1329 |
| 1330 // IMPORTANT | 1330 // IMPORTANT |
| 1331 // Do not add anything below this line until you've verified your new code | 1331 // Do not add anything below this line until you've verified your new code |
| 1332 // does not interfere with the critical initialization order below. Some of | 1332 // does not interfere with the critical initialization order below. Some of |
| 1333 // the calls below end up implicitly creating threads and as such new calls | 1333 // the calls below end up implicitly creating threads and as such new calls |
| 1334 // typically either belong before them or in a later startup phase. | 1334 // typically either belong before them or in a later startup phase. |
| 1335 | 1335 |
| 1336 // Now the command line has been mutated based on about:flags, we can | 1336 // Now that the command line has been mutated based on about:flags, we can |
| 1337 // initialize field trials and setup metrics. The field trials are needed by | 1337 // initialize field trials and setup metrics. The field trials are needed by |
| 1338 // IOThread's initialization which happens in BrowserProcess:PreCreateThreads. | 1338 // IOThread's initialization which happens in BrowserProcess:PreCreateThreads. |
| 1339 SetupFieldTrials(); | 1339 SetupFieldTrials(); |
| 1340 | 1340 |
| 1341 // Task Scheduler initialization needs to be here for the following reasons: | 1341 // Task Scheduler initialization needs to be here for the following reasons: |
| 1342 // * After |SetupFieldTrials()|: Initialization uses variations. | 1342 // * After |SetupFieldTrials()|: Initialization uses variations. |
| 1343 // * Before |SetupMetrics()|: |SetupMetrics()| uses the blocking pool. The | 1343 // * Before |SetupMetrics()|: |SetupMetrics()| uses the blocking pool. The |
| 1344 // Task Scheduler must do any necessary redirection before then. | 1344 // Task Scheduler must do any necessary redirection before then. |
| 1345 // * Near the end of |PreCreateThreads()|: The TaskScheduler needs to be | 1345 // * Near the end of |PreCreateThreads()|: The TaskScheduler needs to be |
| 1346 // created before any other threads are (by contract) but it creates | 1346 // created before any other threads are (by contract) but it creates |
| (...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2217 chromeos::CrosSettings::Shutdown(); | 2217 chromeos::CrosSettings::Shutdown(); |
| 2218 #endif // defined(OS_CHROMEOS) | 2218 #endif // defined(OS_CHROMEOS) |
| 2219 #endif // defined(OS_ANDROID) | 2219 #endif // defined(OS_ANDROID) |
| 2220 } | 2220 } |
| 2221 | 2221 |
| 2222 // Public members: | 2222 // Public members: |
| 2223 | 2223 |
| 2224 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2224 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 2225 chrome_extra_parts_.push_back(parts); | 2225 chrome_extra_parts_.push_back(parts); |
| 2226 } | 2226 } |
| OLD | NEW |