OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/crash_upload_list_win.h" | 5 #include "chrome/browser/crash_upload_list_win.h" |
6 | 6 |
7 #include "base/stringprintf.h" | 7 #include "base/strings/string_util.h" |
8 #include "base/string_util.h" | 8 #include "base/strings/stringprintf.h" |
9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
10 | 10 |
11 CrashUploadListWin::CrashUploadListWin(Delegate* delegate) | 11 CrashUploadListWin::CrashUploadListWin(Delegate* delegate) |
12 : CrashUploadList(delegate) {} | 12 : CrashUploadList(delegate) {} |
13 | 13 |
14 void CrashUploadListWin::LoadCrashList() { | 14 void CrashUploadListWin::LoadCrashList() { |
15 std::vector<uint8> buffer(1024); | 15 std::vector<uint8> buffer(1024); |
16 HANDLE event_log = OpenEventLog(NULL, L"Application"); | 16 HANDLE event_log = OpenEventLog(NULL, L"Application"); |
17 if (event_log) { | 17 if (event_log) { |
18 while (true) { | 18 while (true) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 size_t end_index = message.find(pattern_suffix, start_index); | 71 size_t end_index = message.find(pattern_suffix, start_index); |
72 if (end_index != std::wstring::npos) { | 72 if (end_index != std::wstring::npos) { |
73 std::wstring crash_id = | 73 std::wstring crash_id = |
74 message.substr(start_index, end_index - start_index); | 74 message.substr(start_index, end_index - start_index); |
75 crashes().push_back( | 75 crashes().push_back( |
76 CrashInfo(base::SysWideToUTF8(crash_id), | 76 CrashInfo(base::SysWideToUTF8(crash_id), |
77 base::Time::FromDoubleT(record->TimeGenerated))); | 77 base::Time::FromDoubleT(record->TimeGenerated))); |
78 } | 78 } |
79 } | 79 } |
80 } | 80 } |
OLD | NEW |