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