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

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

Issue 2308763002: Integrate Crashpad UMA (Closed)
Patch Set: . Created 4 years, 3 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 2013 The Chromium Authors. All rights reserved. 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 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_CRASH_REPORTER_CLIENT_H_ 5 #ifndef COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_
6 #define COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_ 6 #define COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 // Custom crash minidump handler after the minidump is generated. 115 // Custom crash minidump handler after the minidump is generated.
116 // Returns true if the minidump is handled (client); otherwise, return false 116 // Returns true if the minidump is handled (client); otherwise, return false
117 // to fallback to default handler. 117 // to fallback to default handler.
118 // WARNING: this handler runs in a compromised context. It may not call into 118 // WARNING: this handler runs in a compromised context. It may not call into
119 // libc nor allocate memory normally. 119 // libc nor allocate memory normally.
120 virtual bool HandleCrashDump(const char* crashdump_filename); 120 virtual bool HandleCrashDump(const char* crashdump_filename);
121 #endif 121 #endif
122 122
123 // The location where minidump files should be written. Returns true if 123 // The location where minidump files should be written. Returns true if
124 // |crash_dir| was set. 124 // |crash_dir| was set. Windows has to use base::string16 because this code
125 // needs to work in chrome_elf, where only kernel32.dll is allowed, and
126 // base::FilePath and its dependencies pull in other DLLs.
125 #if defined(OS_WIN) 127 #if defined(OS_WIN)
126 virtual bool GetCrashDumpLocation(base::string16* crash_dir); 128 virtual bool GetCrashDumpLocation(base::string16* crash_dir);
127 #else 129 #else
128 virtual bool GetCrashDumpLocation(base::FilePath* crash_dir); 130 virtual bool GetCrashDumpLocation(base::FilePath* crash_dir);
129 #endif 131 #endif
130 132
133 // The location where metrics files should be written. Returns true if
134 // |metrics_dir| was set. Windows has to use base::string16 because this code
135 // needs to work in chrome_elf, where only kernel32.dll is allowed, and
136 // base::FilePath and its dependencies pull in other DLLs.
137 #if defined(OS_WIN)
138 virtual bool GetCrashMetricsLocation(base::string16* metrics_dir);
139 #else
140 virtual bool GetCrashMetricsLocation(base::FilePath* metrics_dir);
141 #endif
142
131 // Register all of the potential crash keys that can be sent to the crash 143 // Register all of the potential crash keys that can be sent to the crash
132 // reporting server. Returns the size of the union of all keys. 144 // reporting server. Returns the size of the union of all keys.
133 virtual size_t RegisterCrashKeys(); 145 virtual size_t RegisterCrashKeys();
134 146
135 // Returns true if running in unattended mode (for automated testing). 147 // Returns true if running in unattended mode (for automated testing).
136 virtual bool IsRunningUnattended(); 148 virtual bool IsRunningUnattended();
137 149
138 // Returns true if the user has given consent to collect stats. 150 // Returns true if the user has given consent to collect stats.
139 virtual bool GetCollectStatsConsent(); 151 virtual bool GetCollectStatsConsent();
140 152
(...skipping 21 matching lines...) Expand all
162 virtual bool ShouldEnableBreakpadMicrodumps(); 174 virtual bool ShouldEnableBreakpadMicrodumps();
163 #endif 175 #endif
164 176
165 // Returns true if breakpad should run in the given process type. 177 // Returns true if breakpad should run in the given process type.
166 virtual bool EnableBreakpadForProcess(const std::string& process_type); 178 virtual bool EnableBreakpadForProcess(const std::string& process_type);
167 }; 179 };
168 180
169 } // namespace crash_reporter 181 } // namespace crash_reporter
170 182
171 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_ 183 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASH_REPORTER_CLIENT_H_
OLDNEW
« no previous file with comments | « chrome/browser/metrics/chrome_metrics_service_client.cc ('k') | components/crash/content/app/crash_reporter_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698