From ccaff65dbdd32a73f588ff5766f29910a8097d2a Mon Sep 17 00:00:00 2001 From: "viettrungluu@chromium.org" Date: Sat, 31 Jul 2010 06:28:20 +0000 Subject: Convert src/net to use std::string/char* for DictionaryValue keys. Hopefully I got them all. BUG=23581 TEST=net_unittests Review URL: http://codereview.chromium.org/3013048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54433 0039d316-1c4b-4281-b951-d872f2087c98 --- net/base/host_resolver_impl.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'net/base/host_resolver_impl.cc') diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc index 43889ac..aa1ed9c 100644 --- a/net/base/host_resolver_impl.cc +++ b/net/base/host_resolver_impl.cc @@ -23,6 +23,7 @@ #include "base/stl_util-inl.h" #include "base/string_util.h" #include "base/time.h" +#include "base/utf_string_conversions.h" #include "base/values.h" #include "base/worker_pool.h" #include "net/base/address_list.h" @@ -95,13 +96,13 @@ class HostResolveFailedParams : public NetLog::EventParameters { virtual Value* ToValue() const { DictionaryValue* dict = new DictionaryValue(); - dict->SetInteger(L"net_error", net_error_); - dict->SetBoolean(L"was_from_cache", was_from_cache_); + dict->SetInteger("net_error", net_error_); + dict->SetBoolean("was_from_cache", was_from_cache_); if (os_error_) { - dict->SetInteger(L"os_error", os_error_); + dict->SetInteger("os_error", os_error_); #if defined(OS_POSIX) - dict->SetString(L"os_error_string", gai_strerror(os_error_)); + dict->SetString("os_error_string", gai_strerror(os_error_)); #elif defined(OS_WIN) // Map the error code to a human-readable string. LPWSTR error_string = NULL; @@ -113,7 +114,7 @@ class HostResolveFailedParams : public NetLog::EventParameters { (LPWSTR)&error_string, 0, // Buffer size. 0); // Arguments (unused). - dict->SetString(L"os_error_string", error_string); + dict->SetString("os_error_string", WideToUTF8(error_string)); LocalFree(error_string); #endif } -- cgit v1.1