OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/net/resolve_proxy_msg_helper.h" | 5 #include "chrome/browser/net/resolve_proxy_msg_helper.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "chrome/browser/profile.h" | 8 #include "chrome/browser/profile.h" |
9 #include "chrome/browser/net/url_request_context_getter.h" | 9 #include "chrome/browser/net/url_request_context_getter.h" |
10 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 if (!ok) { | 59 if (!ok) { |
60 // During shutdown, there may be no ProxyService to use, because the | 60 // During shutdown, there may be no ProxyService to use, because the |
61 // default ChromeURLRequestContext has already been NULL-ed out. | 61 // default ChromeURLRequestContext has already been NULL-ed out. |
62 LOG(WARNING) << "Failed getting default URLRequestContext"; | 62 LOG(WARNING) << "Failed getting default URLRequestContext"; |
63 OnResolveProxyCompleted(net::ERR_FAILED); | 63 OnResolveProxyCompleted(net::ERR_FAILED); |
64 return; | 64 return; |
65 } | 65 } |
66 | 66 |
67 int result = proxy_service_->ResolveProxy( | 67 int result = proxy_service_->ResolveProxy( |
68 req.url, &proxy_info_, &callback_, &req.pac_req, NULL); | 68 req.url, &proxy_info_, &callback_, &req.pac_req, net::BoundNetLog()); |
69 | 69 |
70 // Completed synchronously. | 70 // Completed synchronously. |
71 if (result != net::ERR_IO_PENDING) | 71 if (result != net::ERR_IO_PENDING) |
72 OnResolveProxyCompleted(result); | 72 OnResolveProxyCompleted(result); |
73 } | 73 } |
74 | 74 |
75 bool ResolveProxyMsgHelper::GetProxyService( | 75 bool ResolveProxyMsgHelper::GetProxyService( |
76 scoped_refptr<net::ProxyService>* out) const { | 76 scoped_refptr<net::ProxyService>* out) const { |
77 // Unit-tests specify their own proxy service to use. | 77 // Unit-tests specify their own proxy service to use. |
78 if (proxy_service_override_) { | 78 if (proxy_service_override_) { |
(...skipping 21 matching lines...) Expand all Loading... |
100 | 100 |
101 for (PendingRequestList::iterator it = pending_requests_.begin(); | 101 for (PendingRequestList::iterator it = pending_requests_.begin(); |
102 it != pending_requests_.end(); | 102 it != pending_requests_.end(); |
103 ++it) { | 103 ++it) { |
104 delete it->reply_msg; | 104 delete it->reply_msg; |
105 } | 105 } |
106 | 106 |
107 proxy_service_ = NULL; | 107 proxy_service_ = NULL; |
108 pending_requests_.clear(); | 108 pending_requests_.clear(); |
109 } | 109 } |
OLD | NEW |