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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 #include "chrome/browser/component_updater/file_type_policies_component_installe
r.h" | 53 #include "chrome/browser/component_updater/file_type_policies_component_installe
r.h" |
54 #include "chrome/browser/component_updater/origin_trials_component_installer.h" | 54 #include "chrome/browser/component_updater/origin_trials_component_installer.h" |
55 #include "chrome/browser/component_updater/pepper_flash_component_installer.h" | 55 #include "chrome/browser/component_updater/pepper_flash_component_installer.h" |
56 #include "chrome/browser/component_updater/recovery_component_installer.h" | 56 #include "chrome/browser/component_updater/recovery_component_installer.h" |
57 #include "chrome/browser/component_updater/recovery_improved_component_installer
.h" | 57 #include "chrome/browser/component_updater/recovery_improved_component_installer
.h" |
58 #include "chrome/browser/component_updater/sth_set_component_installer.h" | 58 #include "chrome/browser/component_updater/sth_set_component_installer.h" |
59 #include "chrome/browser/component_updater/subresource_filter_component_installe
r.h" | 59 #include "chrome/browser/component_updater/subresource_filter_component_installe
r.h" |
60 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h
" | 60 #include "chrome/browser/component_updater/supervised_user_whitelist_installer.h
" |
61 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" | 61 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" |
62 #include "chrome/browser/defaults.h" | 62 #include "chrome/browser/defaults.h" |
| 63 #include "chrome/browser/experiments/memory_ablation_experiment.h" |
63 #include "chrome/browser/first_run/first_run.h" | 64 #include "chrome/browser/first_run/first_run.h" |
64 #include "chrome/browser/geolocation/chrome_access_token_store.h" | 65 #include "chrome/browser/geolocation/chrome_access_token_store.h" |
65 #include "chrome/browser/gpu/gpu_profile_cache.h" | 66 #include "chrome/browser/gpu/gpu_profile_cache.h" |
66 #include "chrome/browser/gpu/three_d_api_observer.h" | 67 #include "chrome/browser/gpu/three_d_api_observer.h" |
67 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" | 68 #include "chrome/browser/media/webrtc/media_capture_devices_dispatcher.h" |
68 #include "chrome/browser/memory/tab_manager.h" | 69 #include "chrome/browser/memory/tab_manager.h" |
69 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" | 70 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" |
70 #include "chrome/browser/metrics/field_trial_synchronizer.h" | 71 #include "chrome/browser/metrics/field_trial_synchronizer.h" |
71 #include "chrome/browser/metrics/renderer_uptime_tracker.h" | 72 #include "chrome/browser/metrics/renderer_uptime_tracker.h" |
72 #include "chrome/browser/metrics/thread_watcher.h" | 73 #include "chrome/browser/metrics/thread_watcher.h" |
(...skipping 1349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1422 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { | 1423 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { |
1423 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); | 1424 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); |
1424 | 1425 |
1425 SCOPED_UMA_HISTOGRAM_LONG_TIMER("Startup.PreMainMessageLoopRunImplLongTime"); | 1426 SCOPED_UMA_HISTOGRAM_LONG_TIMER("Startup.PreMainMessageLoopRunImplLongTime"); |
1426 const base::TimeTicks start_time_step1 = base::TimeTicks::Now(); | 1427 const base::TimeTicks start_time_step1 = base::TimeTicks::Now(); |
1427 | 1428 |
1428 // This must occur at PreMainMessageLoopRun because |SetupMetrics()| uses the | 1429 // This must occur at PreMainMessageLoopRun because |SetupMetrics()| uses the |
1429 // blocking pool, which is disabled until the CreateThreads phase of startup. | 1430 // blocking pool, which is disabled until the CreateThreads phase of startup. |
1430 SetupMetrics(); | 1431 SetupMetrics(); |
1431 | 1432 |
| 1433 // Can't be in SetupFieldTrials() because it needs a task runner. |
| 1434 MemoryAblationExperiment::MaybeStart( |
| 1435 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
| 1436 |
1432 #if defined(OS_WIN) | 1437 #if defined(OS_WIN) |
1433 // Windows parental controls calls can be slow, so we do an early init here | 1438 // Windows parental controls calls can be slow, so we do an early init here |
1434 // that calculates this value off of the UI thread. | 1439 // that calculates this value off of the UI thread. |
1435 IncognitoModePrefs::InitializePlatformParentalControls(); | 1440 IncognitoModePrefs::InitializePlatformParentalControls(); |
1436 #endif | 1441 #endif |
1437 | 1442 |
1438 #if BUILDFLAG(ENABLE_EXTENSIONS) | 1443 #if BUILDFLAG(ENABLE_EXTENSIONS) |
1439 if (!variations::GetVariationParamValue( | 1444 if (!variations::GetVariationParamValue( |
1440 "LightSpeed", "EarlyInitStartup").empty()) { | 1445 "LightSpeed", "EarlyInitStartup").empty()) { |
1441 // Try to compute this early on another thread so that we don't spend time | 1446 // Try to compute this early on another thread so that we don't spend time |
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2074 chromeos::CrosSettings::Shutdown(); | 2079 chromeos::CrosSettings::Shutdown(); |
2075 #endif // defined(OS_CHROMEOS) | 2080 #endif // defined(OS_CHROMEOS) |
2076 #endif // defined(OS_ANDROID) | 2081 #endif // defined(OS_ANDROID) |
2077 } | 2082 } |
2078 | 2083 |
2079 // Public members: | 2084 // Public members: |
2080 | 2085 |
2081 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2086 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
2082 chrome_extra_parts_.push_back(parts); | 2087 chrome_extra_parts_.push_back(parts); |
2083 } | 2088 } |
OLD | NEW |