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

Side by Side Diff: components/crash/content/app/crashpad.h

Issue 2256723002: Fix SyzyASAN build (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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
OLDNEW
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>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/files/file_path.h" 14 #include "base/files/file_path.h"
15 #include "third_party/kasko/kasko_features.h"
16
17 #if BUILDFLAG(ENABLE_KASKO)
18 #include "base/process/process.h"
19 #include "syzygy/kasko/api/crash_key.h"
20 #endif // BUILDFLAG(ENABLE_KASKO)
21 15
22 namespace crash_reporter { 16 namespace crash_reporter {
23 17
24 // Initializes Crashpad in a way that is appropriate for initial_client and 18 // Initializes Crashpad in a way that is appropriate for initial_client and
25 // process_type. 19 // process_type.
26 // 20 //
27 // If initial_client is true, this starts crashpad_handler and sets it as the 21 // If initial_client is true, this starts crashpad_handler and sets it as the
28 // exception handler. Child processes will inherit this exception handler, and 22 // exception handler. Child processes will inherit this exception handler, and
29 // should specify false for this parameter. Although they inherit the exception 23 // should specify false for this parameter. Although they inherit the exception
30 // handler, child processes still need to call this function to perform 24 // handler, child processes still need to call this function to perform
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 ReportUploadState state; 80 ReportUploadState state;
87 }; 81 };
88 82
89 // Obtains a list of reports uploaded to the collection server. This function 83 // Obtains a list of reports uploaded to the collection server. This function
90 // only operates when called in the browser process. All reports in the Crashpad 84 // only operates when called in the browser process. All reports in the Crashpad
91 // database that have been successfully uploaded will be included in this list. 85 // database that have been successfully uploaded will be included in this list.
92 // The list will be sorted in descending order by report creation time (newest 86 // The list will be sorted in descending order by report creation time (newest
93 // reports first). 87 // reports first).
94 void GetReports(std::vector<Report>* reports); 88 void GetReports(std::vector<Report>* reports);
95 89
96 #if BUILDFLAG(ENABLE_KASKO)
97 // Returns a copy of the current crash keys for Kasko.
98 void GetCrashKeysForKasko(std::vector<kasko::api::CrashKey>* crash_keys);
99
100 // Reads the annotations for the executable module for |process| and puts them
101 // into |crash_keys|.
102 void ReadMainModuleAnnotationsForKasko(
103 const base::Process& process,
104 std::vector<kasko::api::CrashKey>* crash_keys);
105 #endif // BUILDFLAG(ENABLE_KASKO)
106
107 namespace internal { 90 namespace internal {
108 91
109 #if defined(OS_WIN) 92 #if defined(OS_WIN)
110 // Returns platform specific annotations. This is broken out on Windows only so 93 // Returns platform specific annotations. This is broken out on Windows only so
111 // that it may be reused by GetCrashKeysForKasko. 94 // that it may be reused by GetCrashKeysForKasko.
112 void GetPlatformCrashpadAnnotations( 95 void GetPlatformCrashpadAnnotations(
113 std::map<std::string, std::string>* annotations); 96 std::map<std::string, std::string>* annotations);
114 #endif // defined(OS_WIN) 97 #endif // defined(OS_WIN)
115 98
116 // The platform-specific portion of InitializeCrashpad(). 99 // The platform-specific portion of InitializeCrashpad().
117 // Returns the database path, if initializing in the browser process. 100 // Returns the database path, if initializing in the browser process.
118 base::FilePath PlatformCrashpadInitialization(bool initial_client, 101 base::FilePath PlatformCrashpadInitialization(bool initial_client,
119 bool browser_process, 102 bool browser_process,
120 bool embedded_handler); 103 bool embedded_handler);
121 104
122 } // namespace internal 105 } // namespace internal
123 106
124 } // namespace crash_reporter 107 } // namespace crash_reporter
125 108
126 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ 109 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698