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 <map> | 10 #include <map> |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 #include "chrome/browser/downgrade/user_data_downgrade.h" | 207 #include "chrome/browser/downgrade/user_data_downgrade.h" |
208 #include "chrome/browser/first_run/try_chrome_dialog_view.h" | 208 #include "chrome/browser/first_run/try_chrome_dialog_view.h" |
209 #include "chrome/browser/first_run/upgrade_util_win.h" | 209 #include "chrome/browser/first_run/upgrade_util_win.h" |
210 #include "chrome/browser/ui/network_profile_bubble.h" | 210 #include "chrome/browser/ui/network_profile_bubble.h" |
211 #include "chrome/browser/win/browser_util.h" | 211 #include "chrome/browser/win/browser_util.h" |
212 #include "chrome/browser/win/chrome_select_file_dialog_factory.h" | 212 #include "chrome/browser/win/chrome_select_file_dialog_factory.h" |
213 #include "chrome/installer/util/browser_distribution.h" | 213 #include "chrome/installer/util/browser_distribution.h" |
214 #include "chrome/installer/util/helper.h" | 214 #include "chrome/installer/util/helper.h" |
215 #include "chrome/installer/util/install_util.h" | 215 #include "chrome/installer/util/install_util.h" |
216 #include "chrome/installer/util/shell_util.h" | 216 #include "chrome/installer/util/shell_util.h" |
| 217 #include "components/crash/content/app/crashpad.h" |
217 #include "ui/base/l10n/l10n_util_win.h" | 218 #include "ui/base/l10n/l10n_util_win.h" |
218 #include "ui/shell_dialogs/select_file_dialog.h" | 219 #include "ui/shell_dialogs/select_file_dialog.h" |
219 #endif // defined(OS_WIN) | 220 #endif // defined(OS_WIN) |
220 | 221 |
221 #if defined(OS_MACOSX) | 222 #if defined(OS_MACOSX) |
222 #include <Security/Security.h> | 223 #include <Security/Security.h> |
223 | 224 |
224 #include "base/mac/scoped_nsautorelease_pool.h" | 225 #include "base/mac/scoped_nsautorelease_pool.h" |
225 #include "chrome/browser/mac/keystone_glue.h" | 226 #include "chrome/browser/mac/keystone_glue.h" |
226 #endif // defined(OS_MACOSX) | 227 #endif // defined(OS_MACOSX) |
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1431 // browser windows and tabs, but no progress has been made in loading | 1432 // browser windows and tabs, but no progress has been made in loading |
1432 // content as the main message loop hasn't started processing tasks yet. | 1433 // content as the main message loop hasn't started processing tasks yet. |
1433 // We setup to observe to the initial page load here to defer running | 1434 // We setup to observe to the initial page load here to defer running |
1434 // task posted via PostAfterStartupTask until its complete. | 1435 // task posted via PostAfterStartupTask until its complete. |
1435 AfterStartupTaskUtils::StartMonitoringStartup(); | 1436 AfterStartupTaskUtils::StartMonitoringStartup(); |
1436 } | 1437 } |
1437 | 1438 |
1438 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { | 1439 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { |
1439 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); | 1440 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); |
1440 | 1441 |
| 1442 #if defined(OS_WIN) |
| 1443 auto block_until_handler_started = reinterpret_cast<void (*)()>( |
| 1444 GetProcAddress(GetModuleHandle(chrome::kChromeElfDllName), |
| 1445 "BlockUntilHandlerStartedImpl")); |
| 1446 if (block_until_handler_started) { |
| 1447 SCOPED_UMA_HISTOGRAM_TIMER("Startup.BlockForCrashpadHandlerStartupTime"); |
| 1448 block_until_handler_started(); |
| 1449 } |
| 1450 #endif |
| 1451 |
1441 SCOPED_UMA_HISTOGRAM_LONG_TIMER("Startup.PreMainMessageLoopRunImplLongTime"); | 1452 SCOPED_UMA_HISTOGRAM_LONG_TIMER("Startup.PreMainMessageLoopRunImplLongTime"); |
1442 const base::TimeTicks start_time_step1 = base::TimeTicks::Now(); | 1453 const base::TimeTicks start_time_step1 = base::TimeTicks::Now(); |
1443 | 1454 |
1444 #if defined(OS_WIN) | 1455 #if defined(OS_WIN) |
1445 // Windows parental controls calls can be slow, so we do an early init here | 1456 // Windows parental controls calls can be slow, so we do an early init here |
1446 // that calculates this value off of the UI thread. | 1457 // that calculates this value off of the UI thread. |
1447 IncognitoModePrefs::InitializePlatformParentalControls(); | 1458 IncognitoModePrefs::InitializePlatformParentalControls(); |
1448 #endif | 1459 #endif |
1449 | 1460 |
1450 #if defined(ENABLE_EXTENSIONS) | 1461 #if defined(ENABLE_EXTENSIONS) |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2115 chromeos::CrosSettings::Shutdown(); | 2126 chromeos::CrosSettings::Shutdown(); |
2116 #endif // defined(OS_CHROMEOS) | 2127 #endif // defined(OS_CHROMEOS) |
2117 #endif // defined(OS_ANDROID) | 2128 #endif // defined(OS_ANDROID) |
2118 } | 2129 } |
2119 | 2130 |
2120 // Public members: | 2131 // Public members: |
2121 | 2132 |
2122 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 2133 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
2123 chrome_extra_parts_.push_back(parts); | 2134 chrome_extra_parts_.push_back(parts); |
2124 } | 2135 } |
OLD | NEW |