Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(388)

Side by Side Diff: chrome/browser/crash_upload_list_win.cc

Issue 12314090: Add utf_string_conversions to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller_browsertest.cc ('k') | chrome/browser/diagnostics/diagnostics_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698