OLD | NEW |
1 // Copyright 2015 The Crashpad Authors. All rights reserved. | 1 // Copyright 2015 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
13 // limitations under the License. | 13 // limitations under the License. |
14 | 14 |
15 #ifndef CRASHPAD_HANDLER_CRASH_REPORT_UPLOAD_THREAD_H_ | 15 #ifndef CRASHPAD_HANDLER_CRASH_REPORT_UPLOAD_THREAD_H_ |
16 #define CRASHPAD_HANDLER_CRASH_REPORT_UPLOAD_THREAD_H_ | 16 #define CRASHPAD_HANDLER_CRASH_REPORT_UPLOAD_THREAD_H_ |
17 | 17 |
18 #include "base/basictypes.h" | |
19 | |
20 #include <string> | 18 #include <string> |
21 | 19 |
| 20 #include "base/macros.h" |
22 #include "base/memory/scoped_ptr.h" | 21 #include "base/memory/scoped_ptr.h" |
23 #include "client/crash_report_database.h" | 22 #include "client/crash_report_database.h" |
24 #include "util/thread/worker_thread.h" | 23 #include "util/thread/worker_thread.h" |
25 | 24 |
26 namespace crashpad { | 25 namespace crashpad { |
27 | 26 |
28 //! \brief A thread that processes pending crash reports in a | 27 //! \brief A thread that processes pending crash reports in a |
29 //! CrashReportDatabase by uploading them or marking them as completed | 28 //! CrashReportDatabase by uploading them or marking them as completed |
30 //! without upload, as desired. | 29 //! without upload, as desired. |
31 //! | 30 //! |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 std::string* response_body); | 128 std::string* response_body); |
130 | 129 |
131 // WorkerThread::Delegate: | 130 // WorkerThread::Delegate: |
132 //! \brief Calls ProcessPendingReports() in response to ReportPending() having | 131 //! \brief Calls ProcessPendingReports() in response to ReportPending() having |
133 //! been called on any thread, as well as periodically on a timer. | 132 //! been called on any thread, as well as periodically on a timer. |
134 void DoWork(const WorkerThread* thread) override; | 133 void DoWork(const WorkerThread* thread) override; |
135 | 134 |
136 std::string url_; | 135 std::string url_; |
137 WorkerThread thread_; | 136 WorkerThread thread_; |
138 CrashReportDatabase* database_; // weak | 137 CrashReportDatabase* database_; // weak |
| 138 |
| 139 DISALLOW_COPY_AND_ASSIGN(CrashReportUploadThread); |
139 }; | 140 }; |
140 | 141 |
141 } // namespace crashpad | 142 } // namespace crashpad |
142 | 143 |
143 #endif // CRASHPAD_HANDLER_CRASH_REPORT_UPLOAD_THREAD_H_ | 144 #endif // CRASHPAD_HANDLER_CRASH_REPORT_UPLOAD_THREAD_H_ |
OLD | NEW |