Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 2743923003: Revert "Make Crashpad start asynchronous, and move back to chrome_elf" (Closed)
Patch Set: . Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 #include "base/win/windows_version.h" 204 #include "base/win/windows_version.h"
205 #include "chrome/browser/chrome_browser_main_win.h" 205 #include "chrome/browser/chrome_browser_main_win.h"
206 #include "chrome/browser/component_updater/sw_reporter_installer_win.h" 206 #include "chrome/browser/component_updater/sw_reporter_installer_win.h"
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/install_static/install_util.h" 213 #include "chrome/install_static/install_util.h"
214 #include "components/crash/content/app/crashpad.h"
215 #include "ui/base/l10n/l10n_util_win.h" 214 #include "ui/base/l10n/l10n_util_win.h"
216 #include "ui/shell_dialogs/select_file_dialog.h" 215 #include "ui/shell_dialogs/select_file_dialog.h"
217 #endif // defined(OS_WIN) 216 #endif // defined(OS_WIN)
218 217
219 #if defined(OS_MACOSX) 218 #if defined(OS_MACOSX)
220 #include <Security/Security.h> 219 #include <Security/Security.h>
221 220
222 #include "base/mac/scoped_nsautorelease_pool.h" 221 #include "base/mac/scoped_nsautorelease_pool.h"
223 #include "chrome/browser/mac/keystone_glue.h" 222 #include "chrome/browser/mac/keystone_glue.h"
224 #endif // defined(OS_MACOSX) 223 #endif // defined(OS_MACOSX)
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1410 // browser windows and tabs, but no progress has been made in loading 1409 // browser windows and tabs, but no progress has been made in loading
1411 // content as the main message loop hasn't started processing tasks yet. 1410 // content as the main message loop hasn't started processing tasks yet.
1412 // We setup to observe to the initial page load here to defer running 1411 // We setup to observe to the initial page load here to defer running
1413 // task posted via PostAfterStartupTask until its complete. 1412 // task posted via PostAfterStartupTask until its complete.
1414 AfterStartupTaskUtils::StartMonitoringStartup(); 1413 AfterStartupTaskUtils::StartMonitoringStartup();
1415 } 1414 }
1416 1415
1417 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { 1416 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
1418 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); 1417 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl");
1419 1418
1420 #if defined(OS_WIN)
1421 HMODULE chrome_elf = GetModuleHandle(chrome::kChromeElfDllName);
1422 if (chrome_elf) {
1423 auto block_until_handler_started = reinterpret_cast<void (*)()>(
1424 GetProcAddress(chrome_elf, "BlockUntilHandlerStartedImpl"));
1425 if (block_until_handler_started) {
1426 SCOPED_UMA_HISTOGRAM_TIMER("Startup.BlockForCrashpadHandlerStartupTime");
1427 block_until_handler_started();
1428 }
1429 }
1430 #endif
1431
1432 SCOPED_UMA_HISTOGRAM_LONG_TIMER("Startup.PreMainMessageLoopRunImplLongTime"); 1419 SCOPED_UMA_HISTOGRAM_LONG_TIMER("Startup.PreMainMessageLoopRunImplLongTime");
1433 const base::TimeTicks start_time_step1 = base::TimeTicks::Now(); 1420 const base::TimeTicks start_time_step1 = base::TimeTicks::Now();
1434 1421
1435 // This must occur at PreMainMessageLoopRun because |SetupMetrics()| uses the 1422 // This must occur at PreMainMessageLoopRun because |SetupMetrics()| uses the
1436 // blocking pool, which is disabled until the CreateThreads phase of startup. 1423 // blocking pool, which is disabled until the CreateThreads phase of startup.
1437 SetupMetrics(); 1424 SetupMetrics();
1438 1425
1439 #if defined(OS_WIN) 1426 #if defined(OS_WIN)
1440 // Windows parental controls calls can be slow, so we do an early init here 1427 // Windows parental controls calls can be slow, so we do an early init here
1441 // that calculates this value off of the UI thread. 1428 // that calculates this value off of the UI thread.
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
2109 chromeos::CrosSettings::Shutdown(); 2096 chromeos::CrosSettings::Shutdown();
2110 #endif // defined(OS_CHROMEOS) 2097 #endif // defined(OS_CHROMEOS)
2111 #endif // defined(OS_ANDROID) 2098 #endif // defined(OS_ANDROID)
2112 } 2099 }
2113 2100
2114 // Public members: 2101 // Public members:
2115 2102
2116 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2103 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2117 chrome_extra_parts_.push_back(parts); 2104 chrome_extra_parts_.push_back(parts);
2118 } 2105 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698