Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ | 5 #ifndef COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ |
| 6 #define COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ | 6 #define COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ |
| 7 | 7 |
| 8 #include <time.h> | 8 #include <time.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 // process with --type=crashpad-handler. Otherwise, this function should be used | 54 // process with --type=crashpad-handler. Otherwise, this function should be used |
| 55 // and will launch an external crashpad_handler.exe which is generally used for | 55 // and will launch an external crashpad_handler.exe which is generally used for |
| 56 // test situations. | 56 // test situations. |
| 57 void InitializeCrashpad(bool initial_client, const std::string& process_type); | 57 void InitializeCrashpad(bool initial_client, const std::string& process_type); |
| 58 | 58 |
| 59 #if defined(OS_WIN) | 59 #if defined(OS_WIN) |
| 60 // This is the same as InitializeCrashpad(), but rather than launching a | 60 // This is the same as InitializeCrashpad(), but rather than launching a |
| 61 // crashpad_handler executable, relaunches the current executable with a command | 61 // crashpad_handler executable, relaunches the current executable with a command |
| 62 // line argument of --type=crashpad-handler. | 62 // line argument of --type=crashpad-handler. |
| 63 void InitializeCrashpadWithEmbeddedHandler(bool initial_client, | 63 void InitializeCrashpadWithEmbeddedHandler(bool initial_client, |
| 64 const std::string& process_type); | 64 const std::string& process_type, |
| 65 const std::string& user_data_dir); | |
|
grt (UTC plus 2)
2017/05/22 10:16:12
please document |user_data_dir|. what is it used f
manzagop (departed)
2017/05/23 14:59:14
Done.
| |
| 65 #endif // OS_WIN | 66 #endif // OS_WIN |
| 66 | 67 |
| 67 // Returns the CrashpadClient for this process. This will lazily create it if | 68 // Returns the CrashpadClient for this process. This will lazily create it if |
| 68 // it does not already exist. This is called as part of InitializeCrashpad. | 69 // it does not already exist. This is called as part of InitializeCrashpad. |
| 69 crashpad::CrashpadClient& GetCrashpadClient(); | 70 crashpad::CrashpadClient& GetCrashpadClient(); |
| 70 | 71 |
| 71 // Enables or disables crash report upload, taking the given consent to upload | 72 // Enables or disables crash report upload, taking the given consent to upload |
| 72 // into account. Consent may be ignored, uploads may not be enabled even with | 73 // into account. Consent may be ignored, uploads may not be enabled even with |
| 73 // consent, but will only be enabled without consent when policy enforces crash | 74 // consent, but will only be enabled without consent when policy enforces crash |
| 74 // reporting. Whether reports upload is a property of the Crashpad database. In | 75 // reporting. Whether reports upload is a property of the Crashpad database. In |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 // Returns platform specific annotations. This is broken out on Windows only so | 114 // Returns platform specific annotations. This is broken out on Windows only so |
| 114 // that it may be reused by GetCrashKeysForKasko. | 115 // that it may be reused by GetCrashKeysForKasko. |
| 115 void GetPlatformCrashpadAnnotations( | 116 void GetPlatformCrashpadAnnotations( |
| 116 std::map<std::string, std::string>* annotations); | 117 std::map<std::string, std::string>* annotations); |
| 117 #endif // defined(OS_WIN) | 118 #endif // defined(OS_WIN) |
| 118 | 119 |
| 119 // The platform-specific portion of InitializeCrashpad(). | 120 // The platform-specific portion of InitializeCrashpad(). |
| 120 // Returns the database path, if initializing in the browser process. | 121 // Returns the database path, if initializing in the browser process. |
| 121 base::FilePath PlatformCrashpadInitialization(bool initial_client, | 122 base::FilePath PlatformCrashpadInitialization(bool initial_client, |
| 122 bool browser_process, | 123 bool browser_process, |
| 123 bool embedded_handler); | 124 bool embedded_handler, |
| 125 const std::string& user_data_dir); | |
|
grt (UTC plus 2)
2017/05/22 10:16:12
please document |user_data_dir|
manzagop (departed)
2017/05/23 14:59:14
Done.
| |
| 124 | 126 |
| 125 } // namespace internal | 127 } // namespace internal |
| 126 | 128 |
| 127 } // namespace crash_reporter | 129 } // namespace crash_reporter |
| 128 | 130 |
| 129 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ | 131 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ |
| OLD | NEW |