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

Side by Side Diff: net/proxy/proxy_script_fetcher_impl.cc

Issue 7204023: Revert 89489 - net: don't check revocation when fetching PAC files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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/http/http_network_transaction.cc ('k') | net/proxy/proxy_script_fetcher_impl_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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/proxy/proxy_script_fetcher_impl.h" 5 #include "net/proxy/proxy_script_fetcher_impl.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/i18n/icu_string_conversions.h" 8 #include "base/i18n/icu_string_conversions.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 138
139 cur_request_.reset(new URLRequest(url, this)); 139 cur_request_.reset(new URLRequest(url, this));
140 cur_request_->set_context(url_request_context_); 140 cur_request_->set_context(url_request_context_);
141 cur_request_->set_method("GET"); 141 cur_request_->set_method("GET");
142 142
143 // Make sure that the PAC script is downloaded using a direct connection, 143 // Make sure that the PAC script is downloaded using a direct connection,
144 // to avoid circular dependencies (fetching is a part of proxy resolution). 144 // to avoid circular dependencies (fetching is a part of proxy resolution).
145 // Also disable the use of the disk cache. The cache is disabled so that if 145 // Also disable the use of the disk cache. The cache is disabled so that if
146 // the user switches networks we don't potentially use the cached response 146 // the user switches networks we don't potentially use the cached response
147 // from old network when we should in fact be re-fetching on the new network. 147 // from old network when we should in fact be re-fetching on the new network.
148 // If the PAC script is hosted on an HTTPS server we bypass revocation 148 cur_request_->set_load_flags(LOAD_BYPASS_PROXY | LOAD_DISABLE_CACHE);
149 // checking in order to avoid a circular dependency when attempting to fetch
150 // the OCSP response or CRL. We could make the revocation check go direct but
151 // the proxy might be the only way to the outside world.
152 cur_request_->set_load_flags(LOAD_BYPASS_PROXY | LOAD_DISABLE_CACHE |
153 LOAD_DISABLE_CERT_REVOCATION_CHECKING);
154 149
155 // Save the caller's info for notification on completion. 150 // Save the caller's info for notification on completion.
156 callback_ = callback; 151 callback_ = callback;
157 result_text_ = text; 152 result_text_ = text;
158 153
159 bytes_read_so_far_.clear(); 154 bytes_read_so_far_.clear();
160 155
161 // Post a task to timeout this request if it takes too long. 156 // Post a task to timeout this request if it takes too long.
162 cur_request_id_ = ++next_id_; 157 cur_request_id_ = ++next_id_;
163 MessageLoop::current()->PostDelayedTask(FROM_HERE, 158 MessageLoop::current()->PostDelayedTask(FROM_HERE,
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 // is still applicable. 307 // is still applicable.
313 if (cur_request_id_ != id) 308 if (cur_request_id_ != id)
314 return; 309 return;
315 310
316 DCHECK(cur_request_.get()); 311 DCHECK(cur_request_.get());
317 result_code_ = ERR_TIMED_OUT; 312 result_code_ = ERR_TIMED_OUT;
318 cur_request_->Cancel(); 313 cur_request_->Cancel();
319 } 314 }
320 315
321 } // namespace net 316 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_network_transaction.cc ('k') | net/proxy/proxy_script_fetcher_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698