ExtensionSyncService: listen for relevant changes instead of being explicitly called...
[chromium-blink-merge.git] / chrome / browser / crash_upload_list_win.h
blob40d8ccf49492645e8588a8c332606df79c44af10
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.
5 #ifndef CHROME_BROWSER_CRASH_UPLOAD_LIST_WIN_H_
6 #define CHROME_BROWSER_CRASH_UPLOAD_LIST_WIN_H_
8 #include "base/macros.h"
9 #include "components/upload_list/crash_upload_list.h"
11 namespace base {
12 class FilePath;
13 class SequencedWorkerPool;
16 // A CrashUploadList that retrieves the list of reported crashes
17 // from the Windows Event Log.
18 class CrashUploadListWin : public CrashUploadList {
19 public:
20 CrashUploadListWin(
21 Delegate* delegate,
22 const base::FilePath& upload_log_path,
23 const scoped_refptr<base::SequencedWorkerPool>& worker_pool);
25 protected:
26 // Loads the list of crashes from the Windows Event Log.
27 void LoadUploadList() override;
29 private:
30 ~CrashUploadListWin() override;
32 // Returns whether the event record is likely a Chrome crash log.
33 bool IsPossibleCrashLogRecord(EVENTLOGRECORD* record) const;
35 // Parses the event record and adds it to the crash list.
36 void ProcessPossibleCrashLogRecord(EVENTLOGRECORD* record);
38 DISALLOW_COPY_AND_ASSIGN(CrashUploadListWin);
41 #endif // CHROME_BROWSER_CRASH_UPLOAD_LIST_WIN_H_