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

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

Issue 2268783002: Manual crash uploads for mac and win (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: policy restrictions + show crashes when crash uploads disabled 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 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // a newly-created database, uploads will be disabled. This function only has an 62 // a newly-created database, uploads will be disabled. This function only has an
63 // effect when called in the browser process. Its effect is immediate and 63 // effect when called in the browser process. Its effect is immediate and
64 // applies to all other process types, including processes that are already 64 // applies to all other process types, including processes that are already
65 // running. 65 // running.
66 void SetUploadConsent(bool consent); 66 void SetUploadConsent(bool consent);
67 67
68 // Determines whether uploads are enabled or disabled. This information is only 68 // Determines whether uploads are enabled or disabled. This information is only
69 // available in the browser process. 69 // available in the browser process.
70 bool GetUploadsEnabled(); 70 bool GetUploadsEnabled();
71 71
72 enum class ReportUploadState { 72 enum class ReportUploadState { NotUploaded, Pending, Uploaded, UserRequested };
Mark Mentovai 2016/08/25 20:25:11 Pending_UserExplicitlyRequested This isn’t persis
gayane -on leave until 09-2017 2016/08/26 00:12:55 Done.
73 NotUploaded,
74 Pending,
75 Uploaded,
76 };
77 73
78 struct Report { 74 struct Report {
79 std::string local_id; 75 std::string local_id;
80 time_t capture_time; 76 time_t capture_time;
81 std::string remote_id; 77 std::string remote_id;
82 time_t upload_time; 78 time_t upload_time;
83 ReportUploadState state; 79 ReportUploadState state;
84 }; 80 };
85 81
86 // Obtains a list of reports uploaded to the collection server. This function 82 // Obtains a list of reports uploaded to the collection server. This function
87 // only operates when called in the browser process. All reports in the Crashpad 83 // only operates when called in the browser process. All reports in the Crashpad
88 // database that have been successfully uploaded will be included in this list. 84 // database that have been successfully uploaded will be included in this list.
89 // The list will be sorted in descending order by report creation time (newest 85 // The list will be sorted in descending order by report creation time (newest
90 // reports first). 86 // reports first).
91 void GetReports(std::vector<Report>* reports); 87 void GetReports(std::vector<Report>* reports);
92 88
89 // Requests a user triggered upload for a crash report with a given id.
90 void RequestSingleCrashUpload(const std::string& local_id);
91
93 namespace internal { 92 namespace internal {
94 93
95 #if defined(OS_WIN) 94 #if defined(OS_WIN)
96 // Returns platform specific annotations. This is broken out on Windows only so 95 // Returns platform specific annotations. This is broken out on Windows only so
97 // that it may be reused by GetCrashKeysForKasko. 96 // that it may be reused by GetCrashKeysForKasko.
98 void GetPlatformCrashpadAnnotations( 97 void GetPlatformCrashpadAnnotations(
99 std::map<std::string, std::string>* annotations); 98 std::map<std::string, std::string>* annotations);
100 #endif // defined(OS_WIN) 99 #endif // defined(OS_WIN)
101 100
102 // The platform-specific portion of InitializeCrashpad(). 101 // The platform-specific portion of InitializeCrashpad().
103 // Returns the database path, if initializing in the browser process. 102 // Returns the database path, if initializing in the browser process.
104 base::FilePath PlatformCrashpadInitialization(bool initial_client, 103 base::FilePath PlatformCrashpadInitialization(bool initial_client,
105 bool browser_process, 104 bool browser_process,
106 bool embedded_handler); 105 bool embedded_handler);
107 106
108 } // namespace internal 107 } // namespace internal
109 108
110 } // namespace crash_reporter 109 } // namespace crash_reporter
111 110
112 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_ 111 #endif // COMPONENTS_CRASH_CONTENT_APP_CRASHPAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698