| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ocsp/nss_ocsp.h" | 5 #include "net/ocsp/nss_ocsp.h" |
| 6 | 6 |
| 7 #include <certt.h> | 7 #include <certt.h> |
| 8 #include <certdb.h> | 8 #include <certdb.h> |
| 9 #include <ocsp.h> | 9 #include <ocsp.h> |
| 10 #include <nspr.h> | 10 #include <nspr.h> |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 if (url_request_context == NULL) | 360 if (url_request_context == NULL) |
| 361 return; | 361 return; |
| 362 | 362 |
| 363 { | 363 { |
| 364 base::AutoLock autolock(lock_); | 364 base::AutoLock autolock(lock_); |
| 365 DCHECK(!io_loop_); | 365 DCHECK(!io_loop_); |
| 366 io_loop_ = MessageLoopForIO::current(); | 366 io_loop_ = MessageLoopForIO::current(); |
| 367 g_ocsp_io_loop.Get().AddRequest(this); | 367 g_ocsp_io_loop.Get().AddRequest(this); |
| 368 } | 368 } |
| 369 | 369 |
| 370 request_ = new net::URLRequest(url_, this, url_request_context); | 370 request_ = url_request_context->CreateRequest(url_, this); |
| 371 // To meet the privacy requirements of incognito mode. | 371 // To meet the privacy requirements of incognito mode. |
| 372 request_->set_load_flags( | 372 request_->set_load_flags( |
| 373 net::LOAD_DISABLE_CACHE | net::LOAD_DO_NOT_SAVE_COOKIES | | 373 net::LOAD_DISABLE_CACHE | net::LOAD_DO_NOT_SAVE_COOKIES | |
| 374 net::LOAD_DO_NOT_SEND_COOKIES); | 374 net::LOAD_DO_NOT_SEND_COOKIES); |
| 375 | 375 |
| 376 if (http_request_method_ == "POST") { | 376 if (http_request_method_ == "POST") { |
| 377 DCHECK(!upload_content_.empty()); | 377 DCHECK(!upload_content_.empty()); |
| 378 DCHECK(!upload_content_type_.empty()); | 378 DCHECK(!upload_content_type_.empty()); |
| 379 | 379 |
| 380 request_->set_method("POST"); | 380 request_->set_method("POST"); |
| (...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 931 void SetURLRequestContextForNSSHttpIO(URLRequestContext* request_context) { | 931 void SetURLRequestContextForNSSHttpIO(URLRequestContext* request_context) { |
| 932 pthread_mutex_lock(&g_request_context_lock); | 932 pthread_mutex_lock(&g_request_context_lock); |
| 933 if (request_context) { | 933 if (request_context) { |
| 934 DCHECK(!g_request_context); | 934 DCHECK(!g_request_context); |
| 935 } | 935 } |
| 936 g_request_context = request_context; | 936 g_request_context = request_context; |
| 937 pthread_mutex_unlock(&g_request_context_lock); | 937 pthread_mutex_unlock(&g_request_context_lock); |
| 938 } | 938 } |
| 939 | 939 |
| 940 } // namespace net | 940 } // namespace net |
| OLD | NEW |