15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2011 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef CHROME_BROWSER_CRASH_UPLOAD_LIST_WIN_H_ 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define CHROME_BROWSER_CRASH_UPLOAD_LIST_WIN_H_ 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "chrome/browser/crash_upload_list.h" 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "base/compiler_specific.h" 105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// A CrashUploadList that retrieves the list of reported crashes 125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// from the Windows Event Log. 135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class CrashUploadListWin : public CrashUploadList { 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) public: 15eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch CrashUploadListWin(Delegate* delegate, const base::FilePath& upload_log_path); 165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) protected: 185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Loads the list of crashes from the Windows Event Log. 19eb525c5499e34cc9c4b825d6d9e75bb07cc06aceBen Murdoch virtual void LoadUploadList() OVERRIDE; 205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) private: 225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Returns whether the event record is likely a Chrome crash log. 235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) bool IsPossibleCrashLogRecord(EVENTLOGRECORD* record) const; 245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) // Parses the event record and adds it to the crash list. 265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) void ProcessPossibleCrashLogRecord(EVENTLOGRECORD* record); 275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(CrashUploadListWin); 295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)}; 305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif // CHROME_BROWSER_CRASH_UPLOAD_LIST_WIN_H_ 32