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

Side by Side Diff: net/base/mapped_host_resolver.cc

Issue 848006: Generalize the net module's LoadLog facility from a passive container, to an event stream (NetLog). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Split up RequestTracker into ConnectJobTracker+RequestTracker+RequestTrackerBase, address comments Created 10 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/base/mapped_host_resolver.h ('k') | net/base/mapped_host_resolver_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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/base/mapped_host_resolver.h" 5 #include "net/base/mapped_host_resolver.h"
6 6
7 #include "base/string_tokenizer.h" 7 #include "base/string_tokenizer.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "net/base/net_util.h" 9 #include "net/base/net_util.h"
10 10
11 namespace net { 11 namespace net {
12 12
13 MappedHostResolver::MappedHostResolver(HostResolver* impl) 13 MappedHostResolver::MappedHostResolver(HostResolver* impl)
14 : impl_(impl) { 14 : impl_(impl) {
15 } 15 }
16 16
17 int MappedHostResolver::Resolve(const RequestInfo& info, 17 int MappedHostResolver::Resolve(const RequestInfo& info,
18 AddressList* addresses, 18 AddressList* addresses,
19 CompletionCallback* callback, 19 CompletionCallback* callback,
20 RequestHandle* out_req, 20 RequestHandle* out_req,
21 LoadLog* load_log) { 21 const BoundNetLog& net_log) {
22 // Modify the request before forwarding it to |impl_|. 22 // Modify the request before forwarding it to |impl_|.
23 RequestInfo modified_info = info; 23 RequestInfo modified_info = info;
24 RewriteRequest(&modified_info); 24 RewriteRequest(&modified_info);
25 return impl_->Resolve(modified_info, addresses, callback, out_req, load_log); 25 return impl_->Resolve(modified_info, addresses, callback, out_req, net_log);
26 } 26 }
27 27
28 void MappedHostResolver::CancelRequest(RequestHandle req) { 28 void MappedHostResolver::CancelRequest(RequestHandle req) {
29 impl_->CancelRequest(req); 29 impl_->CancelRequest(req);
30 } 30 }
31 31
32 void MappedHostResolver::AddObserver(Observer* observer) { 32 void MappedHostResolver::AddObserver(Observer* observer) {
33 impl_->AddObserver(observer); 33 impl_->AddObserver(observer);
34 } 34 }
35 35
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 map_rules_.clear(); 106 map_rules_.clear();
107 107
108 StringTokenizer rules(rules_string, ","); 108 StringTokenizer rules(rules_string, ",");
109 while (rules.GetNext()) { 109 while (rules.GetNext()) {
110 bool ok = AddRuleFromString(rules.token()); 110 bool ok = AddRuleFromString(rules.token());
111 LOG_IF(ERROR, !ok) << "Failed parsing rule: " << rules.token(); 111 LOG_IF(ERROR, !ok) << "Failed parsing rule: " << rules.token();
112 } 112 }
113 } 113 }
114 114
115 } // namespace net 115 } // namespace net
OLDNEW
« no previous file with comments | « net/base/mapped_host_resolver.h ('k') | net/base/mapped_host_resolver_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698