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/stringprintf.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
10 | 10 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 const std::wstring pattern_suffix(L"."); | 66 const std::wstring pattern_suffix(L"."); |
67 std::wstring message((LPWSTR)((uint8*)record + record->StringOffset)); | 67 std::wstring message((LPWSTR)((uint8*)record + record->StringOffset)); |
68 size_t start_index = message.find(pattern_prefix); | 68 size_t start_index = message.find(pattern_prefix); |
69 if (start_index != std::wstring::npos) { | 69 if (start_index != std::wstring::npos) { |
70 start_index += pattern_prefix.size(); | 70 start_index += pattern_prefix.size(); |
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::Sysbase::WideToUTF8(crash_id), |
77 base::Time::FromDoubleT(record->TimeGenerated))); | 77 base::Time::FromDoubleT(record->TimeGenerated))); |
78 } | 78 } |
79 } | 79 } |
80 } | 80 } |
OLD | NEW |