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

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

Issue 2751883004: Merge M58: Revert "Make Crashpad start asynchronous, and move back to chrome_elf" (Closed)
Patch Set: rebase 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
« no previous file with comments | « chrome/app/chrome_exe_main_win.cc ('k') | chrome_elf/chrome_elf.def » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 #include "chrome/browser/downgrade/user_data_downgrade.h" 206 #include "chrome/browser/downgrade/user_data_downgrade.h"
207 #include "chrome/browser/first_run/try_chrome_dialog_view.h" 207 #include "chrome/browser/first_run/try_chrome_dialog_view.h"
208 #include "chrome/browser/first_run/upgrade_util_win.h" 208 #include "chrome/browser/first_run/upgrade_util_win.h"
209 #include "chrome/browser/ui/network_profile_bubble.h" 209 #include "chrome/browser/ui/network_profile_bubble.h"
210 #include "chrome/browser/win/browser_util.h" 210 #include "chrome/browser/win/browser_util.h"
211 #include "chrome/browser/win/chrome_select_file_dialog_factory.h" 211 #include "chrome/browser/win/chrome_select_file_dialog_factory.h"
212 #include "chrome/installer/util/browser_distribution.h" 212 #include "chrome/installer/util/browser_distribution.h"
213 #include "chrome/installer/util/helper.h" 213 #include "chrome/installer/util/helper.h"
214 #include "chrome/installer/util/install_util.h" 214 #include "chrome/installer/util/install_util.h"
215 #include "chrome/installer/util/shell_util.h" 215 #include "chrome/installer/util/shell_util.h"
216 #include "components/crash/content/app/crashpad.h"
217 #include "ui/base/l10n/l10n_util_win.h" 216 #include "ui/base/l10n/l10n_util_win.h"
218 #include "ui/shell_dialogs/select_file_dialog.h" 217 #include "ui/shell_dialogs/select_file_dialog.h"
219 #endif // defined(OS_WIN) 218 #endif // defined(OS_WIN)
220 219
221 #if defined(OS_MACOSX) 220 #if defined(OS_MACOSX)
222 #include <Security/Security.h> 221 #include <Security/Security.h>
223 222
224 #include "base/mac/scoped_nsautorelease_pool.h" 223 #include "base/mac/scoped_nsautorelease_pool.h"
225 #include "chrome/browser/mac/keystone_glue.h" 224 #include "chrome/browser/mac/keystone_glue.h"
226 #endif // defined(OS_MACOSX) 225 #endif // defined(OS_MACOSX)
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1412 // browser windows and tabs, but no progress has been made in loading 1411 // browser windows and tabs, but no progress has been made in loading
1413 // content as the main message loop hasn't started processing tasks yet. 1412 // content as the main message loop hasn't started processing tasks yet.
1414 // We setup to observe to the initial page load here to defer running 1413 // We setup to observe to the initial page load here to defer running
1415 // task posted via PostAfterStartupTask until its complete. 1414 // task posted via PostAfterStartupTask until its complete.
1416 AfterStartupTaskUtils::StartMonitoringStartup(); 1415 AfterStartupTaskUtils::StartMonitoringStartup();
1417 } 1416 }
1418 1417
1419 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { 1418 int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
1420 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl"); 1419 TRACE_EVENT0("startup", "ChromeBrowserMainParts::PreMainMessageLoopRunImpl");
1421 1420
1422 #if defined(OS_WIN)
1423 HMODULE chrome_elf = GetModuleHandle(chrome::kChromeElfDllName);
1424 if (chrome_elf) {
1425 auto block_until_handler_started = reinterpret_cast<void (*)()>(
1426 GetProcAddress(chrome_elf, "BlockUntilHandlerStartedImpl"));
1427 if (block_until_handler_started) {
1428 SCOPED_UMA_HISTOGRAM_TIMER("Startup.BlockForCrashpadHandlerStartupTime");
1429 block_until_handler_started();
1430 }
1431 }
1432 #endif
1433
1434 SCOPED_UMA_HISTOGRAM_LONG_TIMER("Startup.PreMainMessageLoopRunImplLongTime"); 1421 SCOPED_UMA_HISTOGRAM_LONG_TIMER("Startup.PreMainMessageLoopRunImplLongTime");
1435 const base::TimeTicks start_time_step1 = base::TimeTicks::Now(); 1422 const base::TimeTicks start_time_step1 = base::TimeTicks::Now();
1436 1423
1437 // This must occur at PreMainMessageLoopRun because |SetupMetrics()| uses the 1424 // This must occur at PreMainMessageLoopRun because |SetupMetrics()| uses the
1438 // blocking pool, which is disabled until the CreateThreads phase of startup. 1425 // blocking pool, which is disabled until the CreateThreads phase of startup.
1439 SetupMetrics(); 1426 SetupMetrics();
1440 1427
1441 #if defined(OS_WIN) 1428 #if defined(OS_WIN)
1442 // Windows parental controls calls can be slow, so we do an early init here 1429 // Windows parental controls calls can be slow, so we do an early init here
1443 // that calculates this value off of the UI thread. 1430 // that calculates this value off of the UI thread.
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
2111 chromeos::CrosSettings::Shutdown(); 2098 chromeos::CrosSettings::Shutdown();
2112 #endif // defined(OS_CHROMEOS) 2099 #endif // defined(OS_CHROMEOS)
2113 #endif // defined(OS_ANDROID) 2100 #endif // defined(OS_ANDROID)
2114 } 2101 }
2115 2102
2116 // Public members: 2103 // Public members:
2117 2104
2118 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 2105 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
2119 chrome_extra_parts_.push_back(parts); 2106 chrome_extra_parts_.push_back(parts);
2120 } 2107 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_exe_main_win.cc ('k') | chrome_elf/chrome_elf.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698