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

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

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 years, 2 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_mojo.h" 5 #include "net/dns/host_resolver_mojo.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "mojo/public/cpp/bindings/binding.h" 10 #include "mojo/public/cpp/bindings/binding.h"
11 #include "net/base/address_list.h" 11 #include "net/base/address_list.h"
12 #include "net/base/net_errors.h" 12 #include "net/base/net_errors.h"
13 #include "net/dns/mojo_host_type_converters.h" 13 #include "net/dns/mojo_host_type_converters.h"
14 #include "net/log/net_log.h"
15 14
16 namespace net { 15 namespace net {
17 namespace { 16 namespace {
18 17
19 // Default TTL for successful host resolutions. 18 // Default TTL for successful host resolutions.
20 const int kCacheEntryTTLSeconds = 5; 19 const int kCacheEntryTTLSeconds = 5;
21 20
22 // Default TTL for unsuccessful host resolutions. 21 // Default TTL for unsuccessful host resolutions.
23 const int kNegativeCacheEntryTTLSeconds = 0; 22 const int kNegativeCacheEntryTTLSeconds = 0;
24 23
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 if (binding_.is_bound()) 156 if (binding_.is_bound())
158 binding_.Close(); 157 binding_.Close();
159 base::ResetAndReturn(&callback_).Run(error); 158 base::ResetAndReturn(&callback_).Run(error);
160 } 159 }
161 160
162 void HostResolverMojo::Job::OnConnectionError() { 161 void HostResolverMojo::Job::OnConnectionError() {
163 ReportResult(ERR_FAILED, interfaces::AddressListPtr()); 162 ReportResult(ERR_FAILED, interfaces::AddressListPtr());
164 } 163 }
165 164
166 } // namespace net 165 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698