Chromium Code Reviews| Index: snapshot/client/crashpad_annotations_win.h |
| diff --git a/handler/prune_crash_reports_thread.cc b/snapshot/client/crashpad_annotations_win.h |
| similarity index 50% |
| copy from handler/prune_crash_reports_thread.cc |
| copy to snapshot/client/crashpad_annotations_win.h |
| index e6f3a8b02649ff83559c977d0200b64e62c5e2e6..bb2e554af6fe60b97c055ca0d9679097bb9e80a9 100644 |
| --- a/handler/prune_crash_reports_thread.cc |
| +++ b/snapshot/client/crashpad_annotations_win.h |
| @@ -12,33 +12,23 @@ |
| // See the License for the specific language governing permissions and |
| // limitations under the License. |
| -#include "handler/prune_crash_reports_thread.h" |
| +#ifndef CRASHPAD_SNAPSHOT_SNAPSHOT_CLIENT_CRASHPAD_ANNOTATIONS_WIN_H_ |
|
scottmg
2016/01/13 19:12:42
There's an extra SNAPSHOT_ in the guard here.
Patrick Monette
2016/01/13 22:59:40
Removed.
|
| +#define CRASHPAD_SNAPSHOT_SNAPSHOT_CLIENT_CRASHPAD_ANNOTATIONS_WIN_H_ |
| -#include <utility> |
| +#include <windows.h> |
| -#include "client/prune_crash_reports.h" |
| +#include <map> |
| namespace crashpad { |
| -PruneCrashReportThread::PruneCrashReportThread( |
| - CrashReportDatabase* database, |
| - scoped_ptr<PruneCondition> condition) |
| - : thread_(60 * 60 * 24, this), |
| - condition_(std::move(condition)), |
| - database_(database) {} |
| - |
| -PruneCrashReportThread::~PruneCrashReportThread() {} |
| - |
| -void PruneCrashReportThread::Start() { |
| - thread_.Start(60 * 10); |
| -} |
| - |
| -void PruneCrashReportThread::Stop() { |
| - thread_.Stop(); |
| -} |
| - |
| -void PruneCrashReportThread::DoWork(const WorkerThread* thread) { |
| - PruneCrashReportDatabase(database_, condition_.get()); |
| -} |
| +// Reads the crashpad annotations associated to |module| inside |process| and |
|
scottmg
2016/01/13 19:12:42
crashpad -> Crashpad. Or maybe instead, since we k
scottmg
2016/01/13 19:12:42
These need to be Doxygen-ized in Crashpad. Comment
Patrick Monette
2016/01/13 22:59:40
Done.
Patrick Monette
2016/01/13 22:59:40
Done.
|
| +// inserts them into |annotations|. |process| requires PROCESS_QUERY_INFORMATION |
| +// and PROCESS_VM_READ access. On error, returns false and does not modify |
| +// |annotations|. |
| +bool ReadCrashpadAnnotations(HANDLE process, |
| + HMODULE module, |
|
scottmg
2016/01/13 19:12:42
Is it going to be tricky for a user to provide HMO
Patrick Monette
2016/01/13 22:59:40
Good question. Currently I was thinking about enum
|
| + std::map<std::string, std::string>* annotations); |
|
scottmg
2016/01/13 19:12:42
#include <string>
Patrick Monette
2016/01/13 22:59:40
Done.
|
| } // namespace crashpad |
| + |
| +#endif // CRASHPAD_SNAPSHOT_SNAPSHOT_CLIENT_CRASHPAD_ANNOTATIONS_WIN_H_ |