| Index: content/browser/resolve_proxy_msg_helper.cc
|
| diff --git a/content/browser/resolve_proxy_msg_helper.cc b/content/browser/resolve_proxy_msg_helper.cc
|
| index 65a12a0a446a9149dbb815fbacaa9950bef6e777..c9e6ca1d351b03ec8b85529c5db8c713c2cb3efd 100644
|
| --- a/content/browser/resolve_proxy_msg_helper.cc
|
| +++ b/content/browser/resolve_proxy_msg_helper.cc
|
| @@ -42,6 +42,23 @@ void ResolveProxyMsgHelper::OnResolveProxy(const GURL& url,
|
| StartPendingRequest();
|
| }
|
|
|
| +ResolveProxyMsgHelper::~ResolveProxyMsgHelper() {
|
| + // Clear all pending requests if the ProxyService is still alive (if we have a
|
| + // default request context or override).
|
| + if (!pending_requests_.empty()) {
|
| + PendingRequest req = pending_requests_.front();
|
| + proxy_service_->CancelPacRequest(req.pac_req);
|
| + }
|
| +
|
| + for (PendingRequestList::iterator it = pending_requests_.begin();
|
| + it != pending_requests_.end();
|
| + ++it) {
|
| + delete it->reply_msg;
|
| + }
|
| +
|
| + pending_requests_.clear();
|
| +}
|
| +
|
| void ResolveProxyMsgHelper::OnResolveProxyCompleted(int result) {
|
| CHECK(!pending_requests_.empty());
|
|
|
| @@ -80,20 +97,3 @@ void ResolveProxyMsgHelper::StartPendingRequest() {
|
| if (result != net::ERR_IO_PENDING)
|
| OnResolveProxyCompleted(result);
|
| }
|
| -
|
| -ResolveProxyMsgHelper::~ResolveProxyMsgHelper() {
|
| - // Clear all pending requests if the ProxyService is still alive (if we have a
|
| - // default request context or override).
|
| - if (!pending_requests_.empty()) {
|
| - PendingRequest req = pending_requests_.front();
|
| - proxy_service_->CancelPacRequest(req.pac_req);
|
| - }
|
| -
|
| - for (PendingRequestList::iterator it = pending_requests_.begin();
|
| - it != pending_requests_.end();
|
| - ++it) {
|
| - delete it->reply_msg;
|
| - }
|
| -
|
| - pending_requests_.clear();
|
| -}
|
|
|