[email protected] | 91f0755 | 2013-11-13 10:01:01 | [diff] [blame] | 1 | // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_ELF_CHROME_ELF_MAIN_H_ |
| 6 | #define CHROME_ELF_CHROME_ELF_MAIN_H_ |
| 7 | |
Sigurdur Asgeirsson | ea7ff6f0 | 2017-08-03 18:04:57 | [diff] [blame] | 8 | // These functions are the cross-module import interface to chrome_elf.dll. |
Sigurdur Asgeirsson | 320aa65 | 2017-09-26 19:13:58 | [diff] [blame] | 9 | // It is used by chrome.exe, chrome.dll and other clients of chrome_elf. |
Sigurdur Asgeirsson | ea7ff6f0 | 2017-08-03 18:04:57 | [diff] [blame] | 10 | // In tests, these functions are stubbed by implementations in |
| 11 | // chrome_elf_test_stubs.cc. |
| 12 | extern "C" { |
| 13 | |
| 14 | void DumpProcessWithoutCrash(); |
Sigurdur Asgeirsson | c730d3c1 | 2017-08-17 11:52:59 | [diff] [blame] | 15 | |
| 16 | // Returns true if |user_data_dir| or |invalid_data_dir| contain data. |
| 17 | // This should always be the case in non-test builds. |
| 18 | bool GetUserDataDirectoryThunk(wchar_t* user_data_dir, |
Sigurdur Asgeirsson | ea7ff6f0 | 2017-08-03 18:04:57 | [diff] [blame] | 19 | size_t user_data_dir_length, |
| 20 | wchar_t* invalid_user_data_dir, |
| 21 | size_t invalid_user_data_dir_length); |
| 22 | // This function is a temporary workaround for https://crbug.com/655788. We |
| 23 | // need to come up with a better way to initialize crash reporting that can |
| 24 | // happen inside DllMain(). |
| 25 | void SignalInitializeCrashReporting(); |
| 26 | void SignalChromeElf(); |
| 27 | |
Sigurdur Asgeirsson | 320aa65 | 2017-09-26 19:13:58 | [diff] [blame] | 28 | // Sets the metrics client ID in crash keys. |
| 29 | void SetMetricsClientId(const char* client_id); |
| 30 | |
Sigurdur Asgeirsson | ea7ff6f0 | 2017-08-03 18:04:57 | [diff] [blame] | 31 | } // extern "C" |
[email protected] | 91f0755 | 2013-11-13 10:01:01 | [diff] [blame] | 32 | |
| 33 | #endif // CHROME_ELF_CHROME_ELF_MAIN_H_ |