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

Side by Side Diff: net/cert/x509_util.cc

Issue 2503993002: Change unique_ptr::reset() for std::move (Closed)
Patch Set: Change unique_ptr::reset() for std::move Created 4 years 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 | « no previous file | net/disk_cache/simple/simple_entry_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_util.h" 5 #include "net/cert/x509_util.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "crypto/ec_private_key.h" 10 #include "crypto/ec_private_key.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 return false; 105 return false;
106 106
107 bool success = CreateSelfSignedCert(new_key.get(), 107 bool success = CreateSelfSignedCert(new_key.get(),
108 kSignatureDigestAlgorithm, 108 kSignatureDigestAlgorithm,
109 subject, 109 subject,
110 serial_number, 110 serial_number,
111 not_valid_before, 111 not_valid_before,
112 not_valid_after, 112 not_valid_after,
113 der_cert); 113 der_cert);
114 if (success) 114 if (success)
115 key->reset(new_key.release()); 115 *key = std::move(new_key);
116 116
117 return success; 117 return success;
118 } 118 }
119 119
120 bool ParseCertificateSandboxed(const base::StringPiece& certificate, 120 bool ParseCertificateSandboxed(const base::StringPiece& certificate,
121 std::string* subject, 121 std::string* subject,
122 std::string* issuer, 122 std::string* issuer,
123 base::Time* not_before, 123 base::Time* not_before,
124 base::Time* not_after, 124 base::Time* not_after,
125 std::vector<std::string>* dns_names, 125 std::vector<std::string>* dns_names,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 ip_addresses->push_back(ip.ToString()); 166 ip_addresses->push_back(ip.ToString());
167 } 167 }
168 } 168 }
169 169
170 return true; 170 return true;
171 } 171 }
172 172
173 } // namespace x509_util 173 } // namespace x509_util
174 174
175 } // namespace net 175 } // namespace net
OLDNEW
« no previous file with comments | « no previous file | net/disk_cache/simple/simple_entry_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698