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: remoting/protocol/pairing_registry.cc

Issue 1736633002: remoting: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « remoting/protocol/pairing_registry.h ('k') | remoting/signaling/server_log_entry.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "remoting/protocol/pairing_registry.h" 5 #include "remoting/protocol/pairing_registry.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 26 matching lines...) Expand all
37 PairingRegistry::Pairing::Pairing(const base::Time& created_time, 37 PairingRegistry::Pairing::Pairing(const base::Time& created_time,
38 const std::string& client_name, 38 const std::string& client_name,
39 const std::string& client_id, 39 const std::string& client_id,
40 const std::string& shared_secret) 40 const std::string& shared_secret)
41 : created_time_(created_time), 41 : created_time_(created_time),
42 client_name_(client_name), 42 client_name_(client_name),
43 client_id_(client_id), 43 client_id_(client_id),
44 shared_secret_(shared_secret) { 44 shared_secret_(shared_secret) {
45 } 45 }
46 46
47 PairingRegistry::Pairing::Pairing(const Pairing& other) = default;
48
47 PairingRegistry::Pairing::~Pairing() { 49 PairingRegistry::Pairing::~Pairing() {
48 } 50 }
49 51
50 PairingRegistry::Pairing PairingRegistry::Pairing::Create( 52 PairingRegistry::Pairing PairingRegistry::Pairing::Create(
51 const std::string& client_name) { 53 const std::string& client_name) {
52 base::Time created_time = base::Time::Now(); 54 base::Time created_time = base::Time::Now();
53 std::string client_id = base::GenerateGUID(); 55 std::string client_id = base::GenerateGUID();
54 std::string shared_secret; 56 std::string shared_secret;
55 char buffer[kKeySize]; 57 char buffer[kKeySize];
56 crypto::RandBytes(buffer, arraysize(buffer)); 58 crypto::RandBytes(buffer, arraysize(buffer));
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 300
299 void PairingRegistry::ServiceNextRequest() { 301 void PairingRegistry::ServiceNextRequest() {
300 if (pending_requests_.empty()) 302 if (pending_requests_.empty())
301 return; 303 return;
302 304
303 PostTask(delegate_task_runner_, FROM_HERE, pending_requests_.front()); 305 PostTask(delegate_task_runner_, FROM_HERE, pending_requests_.front());
304 } 306 }
305 307
306 } // namespace protocol 308 } // namespace protocol
307 } // namespace remoting 309 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/pairing_registry.h ('k') | remoting/signaling/server_log_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698