-
scottmg authored
This puts the crash database in the user data directory, rather than in the global shared one. In order to accomplish this, the variable expansion from policy needs to be moved to be suitable for use in chrome_elf. This code handles variable expansions in a registry key that can be set to override the user data dir (in either HKLM or HKCU). We do not need to completely remove the usage of DLLs other than kernel32 in the code despite the code being used in chrome_elf, as in all cases, it will not execute until after the DllMain() of chrome_elf has completed, and we load the used functions via GetProcAddress(), not by import lib. Currently, chrome_elf is signalled from WinMain() of chrome to start crash reporting. In the near future it will be started earlier from a background thread spawned in DllMain(). However, that thread cannot execute until DllMain has completed, so it's then safe to cause the other DLL loads that the variable expansion requires. (Regarding the future thread-based spawning, ref: https://blogs.msdn.microsoft.com/oldnewthing/20070904-00/?p=25283/ which explains why the creation of the thread with which we don't synchronize is OK, because DllMain calls are serialized. But we can discuss that more in https://codereview.chromium.org/2475863004/ too. ) BUG=565446 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win10_chromium_x64_rel_ng Review-Url: https://codereview.chromium.org/2487783002 Cr-Commit-Position: refs/heads/master@{#434855}
7433a2b3