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

Side by Side Diff: net/cert_net/nss_ocsp.cc

Issue 1545233002: Convert Pass()→std::move() in //net (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « net/cert_net/cert_net_fetcher_impl_unittest.cc ('k') | net/cert_net/nss_ocsp_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) 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/cert_net/nss_ocsp.h" 5 #include "net/cert_net/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>
10 #include <nspr.h> 9 #include <nspr.h>
11 #include <nss.h> 10 #include <nss.h>
11 #include <ocsp.h>
12 #include <pthread.h> 12 #include <pthread.h>
13 #include <secerr.h> 13 #include <secerr.h>
14
15 #include <algorithm> 14 #include <algorithm>
16 #include <string> 15 #include <string>
16 #include <utility>
17 17
18 #include "base/callback.h" 18 #include "base/callback.h"
19 #include "base/compiler_specific.h" 19 #include "base/compiler_specific.h"
20 #include "base/lazy_instance.h" 20 #include "base/lazy_instance.h"
21 #include "base/location.h" 21 #include "base/location.h"
22 #include "base/logging.h" 22 #include "base/logging.h"
23 #include "base/macros.h" 23 #include "base/macros.h"
24 #include "base/memory/scoped_ptr.h" 24 #include "base/memory/scoped_ptr.h"
25 #include "base/metrics/histogram_macros.h" 25 #include "base/metrics/histogram_macros.h"
26 #include "base/single_thread_task_runner.h" 26 #include "base/single_thread_task_runner.h"
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 DCHECK(!upload_content_.empty()); 403 DCHECK(!upload_content_.empty());
404 DCHECK(!upload_content_type_.empty()); 404 DCHECK(!upload_content_type_.empty());
405 405
406 request_->set_method("POST"); 406 request_->set_method("POST");
407 extra_request_headers_.SetHeader( 407 extra_request_headers_.SetHeader(
408 HttpRequestHeaders::kContentType, upload_content_type_); 408 HttpRequestHeaders::kContentType, upload_content_type_);
409 409
410 scoped_ptr<UploadElementReader> reader(new UploadBytesElementReader( 410 scoped_ptr<UploadElementReader> reader(new UploadBytesElementReader(
411 upload_content_.data(), upload_content_.size())); 411 upload_content_.data(), upload_content_.size()));
412 request_->set_upload( 412 request_->set_upload(
413 ElementsUploadDataStream::CreateWithReader(reader.Pass(), 0)); 413 ElementsUploadDataStream::CreateWithReader(std::move(reader), 0));
414 } 414 }
415 if (!extra_request_headers_.IsEmpty()) 415 if (!extra_request_headers_.IsEmpty())
416 request_->SetExtraRequestHeaders(extra_request_headers_); 416 request_->SetExtraRequestHeaders(extra_request_headers_);
417 417
418 request_->Start(); 418 request_->Start();
419 AddRef(); // Release after |request_| deleted. 419 AddRef(); // Release after |request_| deleted.
420 } 420 }
421 421
422 GURL url_; // The URL we eventually wound up at 422 GURL url_; // The URL we eventually wound up at
423 std::string http_request_method_; 423 std::string http_request_method_;
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 void SetURLRequestContextForNSSHttpIO(URLRequestContext* request_context) { 966 void SetURLRequestContextForNSSHttpIO(URLRequestContext* request_context) {
967 pthread_mutex_lock(&g_request_context_lock); 967 pthread_mutex_lock(&g_request_context_lock);
968 if (request_context) { 968 if (request_context) {
969 DCHECK(!g_request_context); 969 DCHECK(!g_request_context);
970 } 970 }
971 g_request_context = request_context; 971 g_request_context = request_context;
972 pthread_mutex_unlock(&g_request_context_lock); 972 pthread_mutex_unlock(&g_request_context_lock);
973 } 973 }
974 974
975 } // namespace net 975 } // namespace net
OLDNEW
« no previous file with comments | « net/cert_net/cert_net_fetcher_impl_unittest.cc ('k') | net/cert_net/nss_ocsp_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698