DescriptionAdd chrome_crash_reporter_client_win.cc to the source file list for chrome_elf
This is in preparation for switching the exception handling in
chrome_elf from breakpad to crashpad. I will do that in a subsequent
patch.
This patch contains the following changes.
1. base
Changes here are to restrict the usage of FilePath and file_util from
the portions of the base which are referenced by crashpad and
ChromeCrashReporterClient. These in turn end up bringing in
dependencies on message_loop which won't work in chrome_elf. Fixed
logging.cc to not use file path and file util and instead use Windows
API's to achieve the same result. Fixed platform_thread_win.cc to
avoid using windows_version.h as that pulls in object watcher and
other badness.
2. crash_pad_win.cc. Remove usage of PathService and avoid using
startup_metric_utils. That pulls in registry.h which in turn pulls in
object watcher.
3. ChromeCrashReporterClient (Windows).
Removed usage of chrome::RegisterChromeCrashKeys and instead locally
defined a smaller version of that function. I added a TODO at the top
here to remove these functions and the RegisterKeys function from the
CrashClient interface, whenever scottmg's patch which avoids pre
registration of crash keys lands. I also added a static function
InitializeCrashReportingForProcess to this class which does the work
for registering the process with crashpad.
4. install_static.
Added some constants to this library and a new function
GetSwitchValueFromCommandLine to retrieve the value of a switch from
the command line. This is to avoid depending on shell32 via base
command line. Added a unittest for this function.
5. base\message_loop\message_pump_win.cc
This file gets pulled in by users of platform_thread_win.cc which is
used indirectly by lots of base code. This line
tracked_objects::ThreadData::InitializeThreadContext(name); brings in
the deps via TRACE_EVENT. I changed the deps to function pointers
with CHECKs for user32 being loaded and the function pointers being
valid to catch these in the wild.
BUG=604923
TEST=InstallStaticTest.GetSwitchValueFromCommandLineTest
Committed: https://crrev.com/f265187bf390845c6d353fa7c4a9a72575fd86dd
Cr-Commit-Position: refs/heads/master@{#400278}
Patch Set 1 #Patch Set 2 : git cl format #Patch Set 3 : Revert changes to logging.h #Patch Set 4 : Fix gn redness (Attempt 1) #Patch Set 5 : Fix gn redness (Attempt 2) #Patch Set 6 : Fix gn redness (Attempt 3) #Patch Set 7 : Add content:result_codes to the deps of chrome_elf to fix gn redness #Patch Set 8 : Remove usage of PathService #Patch Set 9 : Fix kasko annotations #
Total comments: 23
Patch Set 10 : Address review comments #
Total comments: 1
Patch Set 11 : Avoid depending on user32 from message_pump_win.cc #Patch Set 12 : Fix windows redness #Patch Set 13 : Add a number of dlls to the chrome_elf delay load list for gn. These are pulled in by the third_par… #Patch Set 14 : Add user32 to the list of imports in chrome_elf in build.gn. This dependency comes in via the app_n… #Patch Set 15 : Fix build error with GetCommandLineW #Patch Set 16 : Add dbghelp.dll to the list of delay loads #
Total comments: 12
Patch Set 17 : Address review comments #
Total comments: 8
Patch Set 18 : Address review comments #
Total comments: 7
Patch Set 19 : Address review comments #
Total comments: 2
Patch Set 20 : Address review comments #
Total comments: 12
Patch Set 21 : Address review comments #
Total comments: 11
Patch Set 22 : Address base review comments #
Total comments: 4
Patch Set 23 : Fix presubmit #Patch Set 24 : Flip the arguments of EXPECT_EQ in the install_static unittest #Patch Set 25 : Address review comments #Depends on Patchset: Messages
Total messages: 45 (11 generated)
|