1// Copyright (c) 2011 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 CHROME_BROWSER_CRASH_UPLOAD_LIST_WIN_H_ 6#define CHROME_BROWSER_CRASH_UPLOAD_LIST_WIN_H_ 7 8#include "chrome/browser/crash_upload_list.h" 9#include "base/compiler_specific.h" 10 11// A CrashUploadList that retrieves the list of reported crashes 12// from the Windows Event Log. 13class CrashUploadListWin : public CrashUploadList { 14 public: 15 CrashUploadListWin(Delegate* delegate, const base::FilePath& upload_log_path); 16 17 protected: 18 // Loads the list of crashes from the Windows Event Log. 19 virtual void LoadUploadList() OVERRIDE; 20 21 private: 22 // Returns whether the event record is likely a Chrome crash log. 23 bool IsPossibleCrashLogRecord(EVENTLOGRECORD* record) const; 24 25 // Parses the event record and adds it to the crash list. 26 void ProcessPossibleCrashLogRecord(EVENTLOGRECORD* record); 27 28 DISALLOW_COPY_AND_ASSIGN(CrashUploadListWin); 29}; 30 31#endif // CHROME_BROWSER_CRASH_UPLOAD_LIST_WIN_H_ 32