| 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 390 { | 390 { |
| 391 base::AutoLock autolock(lock_); | 391 base::AutoLock autolock(lock_); |
| 392 DCHECK(!io_loop_); | 392 DCHECK(!io_loop_); |
| 393 io_loop_ = base::MessageLoopForIO::current(); | 393 io_loop_ = base::MessageLoopForIO::current(); |
| 394 g_ocsp_io_loop.Get().AddRequest(this); | 394 g_ocsp_io_loop.Get().AddRequest(this); |
| 395 } | 395 } |
| 396 | 396 |
| 397 request_ = | 397 request_ = |
| 398 new URLRequest(url_, DEFAULT_PRIORITY, this, url_request_context); | 398 new URLRequest(url_, DEFAULT_PRIORITY, this, url_request_context); |
| 399 // To meet the privacy requirements of incognito mode. | 399 // To meet the privacy requirements of incognito mode. |
| 400 request_->SetLoadFlags(LOAD_DISABLE_CACHE | LOAD_DO_NOT_SAVE_COOKIES | | 400 request_->set_load_flags(LOAD_DISABLE_CACHE | LOAD_DO_NOT_SAVE_COOKIES | |
| 401 LOAD_DO_NOT_SEND_COOKIES); | 401 LOAD_DO_NOT_SEND_COOKIES); |
| 402 | 402 |
| 403 if (http_request_method_ == "POST") { | 403 if (http_request_method_ == "POST") { |
| 404 DCHECK(!upload_content_.empty()); | 404 DCHECK(!upload_content_.empty()); |
| 405 DCHECK(!upload_content_type_.empty()); | 405 DCHECK(!upload_content_type_.empty()); |
| 406 | 406 |
| 407 request_->set_method("POST"); | 407 request_->set_method("POST"); |
| 408 extra_request_headers_.SetHeader( | 408 extra_request_headers_.SetHeader( |
| 409 HttpRequestHeaders::kContentType, upload_content_type_); | 409 HttpRequestHeaders::kContentType, upload_content_type_); |
| 410 | 410 |
| 411 scoped_ptr<UploadElementReader> reader(new UploadBytesElementReader( | 411 scoped_ptr<UploadElementReader> reader(new UploadBytesElementReader( |
| (...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 void SetURLRequestContextForNSSHttpIO(URLRequestContext* request_context) { | 967 void SetURLRequestContextForNSSHttpIO(URLRequestContext* request_context) { |
| 968 pthread_mutex_lock(&g_request_context_lock); | 968 pthread_mutex_lock(&g_request_context_lock); |
| 969 if (request_context) { | 969 if (request_context) { |
| 970 DCHECK(!g_request_context); | 970 DCHECK(!g_request_context); |
| 971 } | 971 } |
| 972 g_request_context = request_context; | 972 g_request_context = request_context; |
| 973 pthread_mutex_unlock(&g_request_context_lock); | 973 pthread_mutex_unlock(&g_request_context_lock); |
| 974 } | 974 } |
| 975 | 975 |
| 976 } // namespace net | 976 } // namespace net |
| OLD | NEW |