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