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

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

Issue 2315613002: Extracted NetLog class's inner enum types into their own enum classes and (Closed)
Patch Set: Ran "git cl format" on code. Much formatting ensued. Created 4 years, 3 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
« no previous file with comments | « net/spdy/spdy_stream_unittest.cc ('k') | net/udp/udp_socket_posix.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 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 17 matching lines...) Expand all
28 #include "net/base/ip_address.h" 28 #include "net/base/ip_address.h"
29 #include "net/base/ip_endpoint.h" 29 #include "net/base/ip_endpoint.h"
30 #include "net/base/net_errors.h" 30 #include "net/base/net_errors.h"
31 #include "net/base/url_util.h" 31 #include "net/base/url_util.h"
32 #include "net/dns/dns_client.h" 32 #include "net/dns/dns_client.h"
33 #include "net/dns/dns_config_service.h" 33 #include "net/dns/dns_config_service.h"
34 #include "net/dns/dns_protocol.h" 34 #include "net/dns/dns_protocol.h"
35 #include "net/dns/host_cache.h" 35 #include "net/dns/host_cache.h"
36 #include "net/dns/host_resolver_impl.h" 36 #include "net/dns/host_resolver_impl.h"
37 #include "net/log/net_log.h" 37 #include "net/log/net_log.h"
38 #include "net/log/net_log_source_type.h"
38 #include "net/tools/gdig/file_net_log.h" 39 #include "net/tools/gdig/file_net_log.h"
39 40
40 #if defined(OS_MACOSX) 41 #if defined(OS_MACOSX)
41 #include "base/mac/scoped_nsautorelease_pool.h" 42 #include "base/mac/scoped_nsautorelease_pool.h"
42 #endif 43 #endif
43 44
44 namespace net { 45 namespace net {
45 46
46 namespace { 47 namespace {
47 48
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 unsigned current_index = replay_log_index_; 464 unsigned current_index = replay_log_index_;
464 CompletionCallback callback = base::Bind(&GDig::OnResolveComplete, 465 CompletionCallback callback = base::Bind(&GDig::OnResolveComplete,
465 base::Unretained(this), 466 base::Unretained(this),
466 current_index, 467 current_index,
467 base::Owned(addrlist), 468 base::Owned(addrlist),
468 time_since_start); 469 time_since_start);
469 ++active_resolves_; 470 ++active_resolves_;
470 ++replay_log_index_; 471 ++replay_log_index_;
471 int ret = resolver_->Resolve( 472 int ret = resolver_->Resolve(
472 info, DEFAULT_PRIORITY, addrlist, callback, &request_, 473 info, DEFAULT_PRIORITY, addrlist, callback, &request_,
473 BoundNetLog::Make(log_.get(), net::NetLog::SOURCE_NONE)); 474 BoundNetLog::Make(log_.get(), net::NetLogSourceType::NONE));
474 if (ret != ERR_IO_PENDING) 475 if (ret != ERR_IO_PENDING)
475 callback.Run(ret); 476 callback.Run(ret);
476 } 477 }
477 } 478 }
478 479
479 void GDig::OnResolveComplete(unsigned entry_index, 480 void GDig::OnResolveComplete(unsigned entry_index,
480 AddressList* address_list, 481 AddressList* address_list,
481 base::TimeDelta resolve_start_time, 482 base::TimeDelta resolve_start_time,
482 int val) { 483 int val) {
483 DCHECK_GT(active_resolves_, 0); 484 DCHECK_GT(active_resolves_, 0);
(...skipping 28 matching lines...) Expand all
512 } 513 }
513 514
514 } // empty namespace 515 } // empty namespace
515 516
516 } // namespace net 517 } // namespace net
517 518
518 int main(int argc, const char* argv[]) { 519 int main(int argc, const char* argv[]) {
519 net::GDig dig; 520 net::GDig dig;
520 return dig.Main(argc, argv); 521 return dig.Main(argc, argv);
521 } 522 }
OLDNEW
« no previous file with comments | « net/spdy/spdy_stream_unittest.cc ('k') | net/udp/udp_socket_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698