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

Unified Diff: handler/crash_report_upload_thread.h

Issue 1295363002: Port CrashReportUploadThread to Windows (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: build_config Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | handler/crash_report_upload_thread.cc » ('j') | handler/crash_report_upload_thread.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: handler/crash_report_upload_thread.h
diff --git a/handler/mac/crash_report_upload_thread.h b/handler/crash_report_upload_thread.h
similarity index 93%
rename from handler/mac/crash_report_upload_thread.h
rename to handler/crash_report_upload_thread.h
index 6c9be5bf8c36a63af337205fa2582cd548d5224b..1dc94db85d024cf5bf8ede43d95e74eeb5a04067 100644
--- a/handler/mac/crash_report_upload_thread.h
+++ b/handler/crash_report_upload_thread.h
@@ -12,20 +12,21 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-#ifndef CRASHPAD_HANDLER_MAC_CRASH_REPORT_UPLOAD_THREAD_H_
-#define CRASHPAD_HANDLER_MAC_CRASH_REPORT_UPLOAD_THREAD_H_
+#ifndef CRASHPAD_HANDLER_CRASH_REPORT_UPLOAD_THREAD_H_
+#define CRASHPAD_HANDLER_CRASH_REPORT_UPLOAD_THREAD_H_
#include "base/basictypes.h"
-#include <pthread.h>
-
#include <string>
+#include "base/memory/scoped_ptr.h"
#include "client/crash_report_database.h"
#include "util/synchronization/semaphore.h"
namespace crashpad {
+class HelperThread;
Mark Mentovai 2015/08/18 21:38:12 Since this is just in namespace crashpad, you shou
scottmg 2015/08/18 22:21:40 Done.
+
//! \brief A thread that processes pending crash reports in a
//! CrashReportDatabase by uploading them or marking them as completed
//! without upload, as desired.
@@ -76,6 +77,8 @@ class CrashReportUploadThread {
void ReportPending();
private:
+ friend class HelperThread;
+
//! \brief The result code from UploadReport().
enum class UploadResult {
//! \brief The crash report was uploaded successfully.
@@ -133,20 +136,13 @@ class CrashReportUploadThread {
UploadResult UploadReport(const CrashReportDatabase::Report* report,
std::string* response_body);
- //! \brief Cals ThreadMain().
- //!
- //! \param[in] arg A pointer to the object on which to invoke ThreadMain().
- //!
- //! \return `nullptr`.
- static void* RunThreadMain(void* arg);
-
std::string url_;
CrashReportDatabase* database_; // weak
Semaphore semaphore_; // TODO(mark): Use a condition variable instead?
- pthread_t thread_;
+ scoped_ptr<HelperThread> thread_;
bool running_;
};
} // namespace crashpad
-#endif // CRASHPAD_HANDLER_MAC_CRASH_REPORT_UPLOAD_THREAD_H_
+#endif // CRASHPAD_HANDLER_CRASH_REPORT_UPLOAD_THREAD_H_
« no previous file with comments | « no previous file | handler/crash_report_upload_thread.cc » ('j') | handler/crash_report_upload_thread.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698