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

Side by Side Diff: net/tools/gdig/gdig.cc

Issue 176843022: Move UTF16ToASCII, remove WideToASCII. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
« no previous file with comments | « net/proxy/proxy_resolver_winhttp.cc ('k') | remoting/host/setup/me2me_native_messaging_host.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 <stdio.h> 5 #include <stdio.h>
6 #include <string> 6 #include <string>
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/file_util.h" 12 #include "base/file_util.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/string_split.h" 16 #include "base/strings/string_split.h"
17 #include "base/strings/string_util.h" 17 #include "base/strings/string_util.h"
18 #include "base/strings/stringprintf.h" 18 #include "base/strings/stringprintf.h"
19 #include "base/strings/utf_string_conversions.h"
19 #include "base/time/time.h" 20 #include "base/time/time.h"
20 #include "net/base/address_list.h" 21 #include "net/base/address_list.h"
21 #include "net/base/ip_endpoint.h" 22 #include "net/base/ip_endpoint.h"
22 #include "net/base/net_errors.h" 23 #include "net/base/net_errors.h"
23 #include "net/base/net_log.h" 24 #include "net/base/net_log.h"
24 #include "net/base/net_util.h" 25 #include "net/base/net_util.h"
25 #include "net/dns/dns_client.h" 26 #include "net/dns/dns_client.h"
26 #include "net/dns/dns_config_service.h" 27 #include "net/dns/dns_config_service.h"
27 #include "net/dns/dns_protocol.h" 28 #include "net/dns/dns_protocol.h"
28 #include "net/dns/host_cache.h" 29 #include "net/dns/host_cache.h"
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 parallellism_ = parallellism; 355 parallellism_ = parallellism;
355 } else { 356 } else {
356 fprintf(stderr, "Invalid parallellism parameter\n"); 357 fprintf(stderr, "Invalid parallellism parameter\n");
357 } 358 }
358 } 359 }
359 360
360 if (parsed_command_line.GetArgs().size() == 1) { 361 if (parsed_command_line.GetArgs().size() == 1) {
361 ReplayLogEntry entry; 362 ReplayLogEntry entry;
362 entry.start_time = base::TimeDelta(); 363 entry.start_time = base::TimeDelta();
363 #if defined(OS_WIN) 364 #if defined(OS_WIN)
364 entry.domain_name = WideToASCII(parsed_command_line.GetArgs()[0]); 365 entry.domain_name = base::UTF16ToASCII(parsed_command_line.GetArgs()[0]);
365 #else 366 #else
366 entry.domain_name = parsed_command_line.GetArgs()[0]; 367 entry.domain_name = parsed_command_line.GetArgs()[0];
367 #endif 368 #endif
368 replay_log_.push_back(entry); 369 replay_log_.push_back(entry);
369 } else if (parsed_command_line.GetArgs().size() != 0) { 370 } else if (parsed_command_line.GetArgs().size() != 0) {
370 return false; 371 return false;
371 } 372 }
372 return print_config_ || print_hosts_ || !replay_log_.empty(); 373 return print_config_ || print_hosts_ || !replay_log_.empty();
373 } 374 }
374 375
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 } 506 }
506 507
507 } // empty namespace 508 } // empty namespace
508 509
509 } // namespace net 510 } // namespace net
510 511
511 int main(int argc, const char* argv[]) { 512 int main(int argc, const char* argv[]) {
512 net::GDig dig; 513 net::GDig dig;
513 return dig.Main(argc, argv); 514 return dig.Main(argc, argv);
514 } 515 }
OLDNEW
« no previous file with comments | « net/proxy/proxy_resolver_winhttp.cc ('k') | remoting/host/setup/me2me_native_messaging_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698