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

Side by Side Diff: components/crash/app/crashpad_mac.h

Issue 1001103002: Crashpad! (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sign crashpad_handler Created 5 years, 9 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
« no previous file with comments | « components/crash/app/crash_reporter_client.cc ('k') | components/crash/app/crashpad_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_CRASH_APP_CRASHPAD_MAC_H_
6 #define COMPONENTS_CRASH_APP_CRASHPAD_MAC_H_
7
8 #include <time.h>
9
10 #include <string>
11 #include <vector>
12
13 namespace crash_reporter {
14
15 // Initializes Crashpad in a way that is appropriate for process_type. If
16 // process_type is empty, initializes Crashpad for the browser process, which
17 // starts crashpad_handler and sets it as the exception handler. Other process
18 // types inherit this exception handler from the browser, but still need to
19 // perform additional initialization.
20 void InitializeCrashpad(const std::string& process_type);
21
22 // Enables or disables crash report upload. This is a property of the Crashpad
23 // database. In a newly-created database, uploads will be disabled. This
24 // function only has an effect when called in the browser process. Its effect is
25 // immediate and applies to all other process types, including processes that
26 // are already running.
27 void SetUploadsEnabled(bool enabled);
28
29 // Determines whether uploads are enabled or disabled. This information is only
30 // available in the browser process.
31 bool GetUploadsEnabled();
32
33 struct UploadedReport {
34 std::string local_id;
35 std::string remote_id;
36 time_t creation_time;
37 };
38
39 // Obtains a list of reports uploaded to the collection server. This function
40 // only operates when called in the browser process. All reports in the Crashpad
41 // database that have been successfully uploaded will be included in this list.
42 // The list will be sorted in descending order by report creation time (newest
43 // reports first).
44 //
45 // TODO(mark): The about:crashes UI expects to show only uploaded reports. If it
46 // is ever enhanced to work well with un-uploaded reports, those should be
47 // returned as well. Un-uploaded reports may have a pending upload, may have
48 // experienced upload failure, or may have been collected while uploads were
49 // disabled.
50 void GetUploadedReports(std::vector<UploadedReport>* uploaded_reports);
51
52 } // namespace crash_reporter
53
54 #endif // COMPONENTS_CRASH_APP_CRASHPAD_MAC_H_
OLDNEW
« no previous file with comments | « components/crash/app/crash_reporter_client.cc ('k') | components/crash/app/crashpad_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698