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

Unified Diff: components/crash/app/crash_keys_win.cc

Issue 879783004: Cleanup: Don't bother doing no-op wide/utf16 conversions on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/utility/importer/ie_importer_win.cc ('k') | net/base/filename_util_internal.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/crash/app/crash_keys_win.cc
diff --git a/components/crash/app/crash_keys_win.cc b/components/crash/app/crash_keys_win.cc
index 7263c97857d2028d582465ec7d1811c543c19c48..eda4340d5df8737837a0dfcd0b38872f2df262cc 100644
--- a/components/crash/app/crash_keys_win.cc
+++ b/components/crash/app/crash_keys_win.cc
@@ -10,8 +10,8 @@
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/logging.h"
+#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
-#include "base/strings/utf_string_conversions.h"
#include "components/crash/app/crash_reporter_client.h"
namespace breakpad {
@@ -95,25 +95,25 @@ CrashKeysWin::GetCustomInfo(const std::wstring& exe_path,
// We only expect this method to be called once per process.
// Common enties
custom_entries_.push_back(
- google_breakpad::CustomInfoEntry(L"ver",
- base::UTF16ToWide(version).c_str()));
+ google_breakpad::CustomInfoEntry(L"ver", version.c_str()));
custom_entries_.push_back(
- google_breakpad::CustomInfoEntry(L"prod",
- base::UTF16ToWide(product).c_str()));
+ google_breakpad::CustomInfoEntry(L"prod", product.c_str()));
custom_entries_.push_back(
google_breakpad::CustomInfoEntry(L"plat", L"Win32"));
custom_entries_.push_back(
google_breakpad::CustomInfoEntry(L"ptype", type.c_str()));
- custom_entries_.push_back(google_breakpad::CustomInfoEntry(
- L"pid", base::StringPrintf(L"%d", ::GetCurrentProcessId()).c_str()));
- custom_entries_.push_back(google_breakpad::CustomInfoEntry(
- L"channel", base::UTF16ToWide(channel_name).c_str()));
- custom_entries_.push_back(google_breakpad::CustomInfoEntry(
- L"profile-type", profile_type.c_str()));
-
- if (!special_build.empty())
- custom_entries_.push_back(google_breakpad::CustomInfoEntry(
- L"special", base::UTF16ToWide(special_build).c_str()));
+ custom_entries_.push_back(
+ google_breakpad::CustomInfoEntry(
+ L"pid", base::IntToString16(::GetCurrentProcessId()).c_str()));
+ custom_entries_.push_back(
+ google_breakpad::CustomInfoEntry(L"channel", channel_name.c_str()));
+ custom_entries_.push_back(
+ google_breakpad::CustomInfoEntry(L"profile-type", profile_type.c_str()));
+
+ if (!special_build.empty()) {
+ custom_entries_.push_back(
+ google_breakpad::CustomInfoEntry(L"special", special_build.c_str()));
+ }
if (type == L"plugin" || type == L"ppapi") {
std::wstring plugin_path = cmd_line->GetSwitchValueNative("plugin-path");
@@ -121,7 +121,6 @@ CrashKeysWin::GetCustomInfo(const std::wstring& exe_path,
SetPluginPath(plugin_path);
}
-
// Check whether configuration management controls crash reporting.
bool crash_reporting_enabled = true;
bool controlled_by_policy = crash_client->ReportingIsEnforcedByPolicy(
« no previous file with comments | « chrome/utility/importer/ie_importer_win.cc ('k') | net/base/filename_util_internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698