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

Side by Side Diff: net/dns/host_resolver_impl.cc

Issue 112963005: Update uses of UTF conversions in courgette/, device/, extensions/, google_apis/, gpu/, ipc/, media… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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
« no previous file with comments | « net/dns/dns_config_service_win.cc ('k') | net/ftp/ftp_auth_cache_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/dns/host_resolver_impl.h" 5 #include "net/dns/host_resolver_impl.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <Winsock2.h> 8 #include <Winsock2.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <netdb.h> 10 #include <netdb.h>
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 // Map the error code to a human-readable string. 300 // Map the error code to a human-readable string.
301 LPWSTR error_string = NULL; 301 LPWSTR error_string = NULL;
302 int size = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | 302 int size = FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
303 FORMAT_MESSAGE_FROM_SYSTEM, 303 FORMAT_MESSAGE_FROM_SYSTEM,
304 0, // Use the internal message table. 304 0, // Use the internal message table.
305 os_error, 305 os_error,
306 0, // Use default language. 306 0, // Use default language.
307 (LPWSTR)&error_string, 307 (LPWSTR)&error_string,
308 0, // Buffer size. 308 0, // Buffer size.
309 0); // Arguments (unused). 309 0); // Arguments (unused).
310 dict->SetString("os_error_string", WideToUTF8(error_string)); 310 dict->SetString("os_error_string", base::WideToUTF8(error_string));
311 LocalFree(error_string); 311 LocalFree(error_string);
312 #endif 312 #endif
313 } 313 }
314 314
315 return dict; 315 return dict;
316 } 316 }
317 317
318 // Creates NetLog parameters when the DnsTask failed. 318 // Creates NetLog parameters when the DnsTask failed.
319 base::Value* NetLogDnsTaskFailedCallback(int net_error, 319 base::Value* NetLogDnsTaskFailedCallback(int net_error,
320 int dns_error, 320 int dns_error,
(...skipping 2026 matching lines...) Expand 10 before | Expand all | Expand 10 after
2347 dns_client_->SetConfig(dns_config); 2347 dns_client_->SetConfig(dns_config);
2348 num_dns_failures_ = 0; 2348 num_dns_failures_ = 0;
2349 if (dns_client_->GetConfig()) 2349 if (dns_client_->GetConfig())
2350 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.DnsClientEnabled", true); 2350 UMA_HISTOGRAM_BOOLEAN("AsyncDNS.DnsClientEnabled", true);
2351 } 2351 }
2352 2352
2353 AbortDnsTasks(); 2353 AbortDnsTasks();
2354 } 2354 }
2355 2355
2356 } // namespace net 2356 } // namespace net
OLDNEW
« no previous file with comments | « net/dns/dns_config_service_win.cc ('k') | net/ftp/ftp_auth_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698