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

Side by Side Diff: net/ssl/channel_id_store.cc

Issue 1893083002: Change scoped_ptr to std::unique_ptr in //net. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptr-net-all: iwyu Created 4 years, 8 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/ssl/channel_id_store.h ('k') | net/ssl/client_cert_store_nss.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ssl/channel_id_store.h" 5 #include "net/ssl/channel_id_store.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "crypto/ec_private_key.h" 9 #include "crypto/ec_private_key.h"
10 10
11 namespace net { 11 namespace net {
12 12
13 ChannelIDStore::ChannelID::ChannelID() { 13 ChannelIDStore::ChannelID::ChannelID() {
14 } 14 }
15 15
16 ChannelIDStore::ChannelID::ChannelID(const std::string& server_identifier, 16 ChannelIDStore::ChannelID::ChannelID(const std::string& server_identifier,
17 base::Time creation_time, 17 base::Time creation_time,
18 scoped_ptr<crypto::ECPrivateKey> key) 18 std::unique_ptr<crypto::ECPrivateKey> key)
19 : server_identifier_(server_identifier), 19 : server_identifier_(server_identifier),
20 creation_time_(creation_time), 20 creation_time_(creation_time),
21 key_(std::move(key)) {} 21 key_(std::move(key)) {}
22 22
23 ChannelIDStore::ChannelID::ChannelID(const ChannelID& other) 23 ChannelIDStore::ChannelID::ChannelID(const ChannelID& other)
24 : server_identifier_(other.server_identifier_), 24 : server_identifier_(other.server_identifier_),
25 creation_time_(other.creation_time_), 25 creation_time_(other.creation_time_),
26 key_(other.key_ ? other.key_->Copy() : nullptr) { 26 key_(other.key_ ? other.key_->Copy() : nullptr) {
27 } 27 }
28 28
29 ChannelIDStore::ChannelID& ChannelIDStore::ChannelID::operator=( 29 ChannelIDStore::ChannelID& ChannelIDStore::ChannelID::operator=(
30 const ChannelID& other) { 30 const ChannelID& other) {
31 if (&other == this) 31 if (&other == this)
32 return *this; 32 return *this;
33 server_identifier_ = other.server_identifier_; 33 server_identifier_ = other.server_identifier_;
34 creation_time_ = other.creation_time_; 34 creation_time_ = other.creation_time_;
35 if (other.key_) 35 if (other.key_)
36 key_.reset(other.key_->Copy()); 36 key_.reset(other.key_->Copy());
37 return *this; 37 return *this;
38 } 38 }
39 39
40 ChannelIDStore::ChannelID::~ChannelID() {} 40 ChannelIDStore::ChannelID::~ChannelID() {}
41 41
42 void ChannelIDStore::InitializeFrom(const ChannelIDList& list) { 42 void ChannelIDStore::InitializeFrom(const ChannelIDList& list) {
43 for (ChannelIDList::const_iterator i = list.begin(); i != list.end(); 43 for (ChannelIDList::const_iterator i = list.begin(); i != list.end();
44 ++i) { 44 ++i) {
45 SetChannelID(scoped_ptr<ChannelID>(new ChannelID(*i))); 45 SetChannelID(std::unique_ptr<ChannelID>(new ChannelID(*i)));
46 } 46 }
47 } 47 }
48 48
49 } // namespace net 49 } // namespace net
OLDNEW
« no previous file with comments | « net/ssl/channel_id_store.h ('k') | net/ssl/client_cert_store_nss.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698