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

Unified Diff: net/base/host_resolver_impl.cc

Issue 3013048: Convert src/net to use std::string/char* for DictionaryValue keys. (Closed)
Patch Set: fix for windows Created 10 years, 5 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 | « net/base/address_list_net_log_param.cc ('k') | net/base/net_log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver_impl.cc
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index 8d5fe26e394269213025a81d779753c13540d2a0..d529d106d2bdad0ca70bcc912e3fb853955a8857 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
}
« no previous file with comments | « net/base/address_list_net_log_param.cc ('k') | net/base/net_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698