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

Side by Side Diff: net/cert/x509_certificate_net_log_param.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/nss_cert_database.cc ('k') | net/cert_net/cert_net_fetcher_impl.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/x509_certificate_net_log_param.h" 5 #include "net/cert/x509_certificate_net_log_param.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility>
8 #include <vector> 9 #include <vector>
9 10
10 #include "base/values.h" 11 #include "base/values.h"
11 #include "net/cert/x509_certificate.h" 12 #include "net/cert/x509_certificate.h"
12 13
13 namespace net { 14 namespace net {
14 15
15 scoped_ptr<base::Value> NetLogX509CertificateCallback( 16 scoped_ptr<base::Value> NetLogX509CertificateCallback(
16 const X509Certificate* certificate, 17 const X509Certificate* certificate,
17 NetLogCaptureMode capture_mode) { 18 NetLogCaptureMode capture_mode) {
18 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue()); 19 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
19 scoped_ptr<base::ListValue> certs(new base::ListValue()); 20 scoped_ptr<base::ListValue> certs(new base::ListValue());
20 std::vector<std::string> encoded_chain; 21 std::vector<std::string> encoded_chain;
21 certificate->GetPEMEncodedChain(&encoded_chain); 22 certificate->GetPEMEncodedChain(&encoded_chain);
22 for (size_t i = 0; i < encoded_chain.size(); ++i) 23 for (size_t i = 0; i < encoded_chain.size(); ++i)
23 certs->Append(new base::StringValue(encoded_chain[i])); 24 certs->Append(new base::StringValue(encoded_chain[i]));
24 dict->Set("certificates", certs.Pass()); 25 dict->Set("certificates", std::move(certs));
25 return dict.Pass(); 26 return std::move(dict);
26 } 27 }
27 28
28 } // namespace net 29 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/nss_cert_database.cc ('k') | net/cert_net/cert_net_fetcher_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698