| OLD | NEW |
| 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 "base/base64.h" | 7 #include "base/base64.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/guid.h" | 9 #include "base/guid.h" |
| 10 #include "crypto/random.h" | 10 #include "crypto/random.h" |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 delegate_->AddPairing(result, AddPairingCallback()); | 71 delegate_->AddPairing(result, AddPairingCallback()); |
| 72 return result; | 72 return result; |
| 73 } | 73 } |
| 74 | 74 |
| 75 void PairingRegistry::GetPairing(const std::string& client_id, | 75 void PairingRegistry::GetPairing(const std::string& client_id, |
| 76 const GetPairingCallback& callback) { | 76 const GetPairingCallback& callback) { |
| 77 DCHECK(CalledOnValidThread()); | 77 DCHECK(CalledOnValidThread()); |
| 78 delegate_->GetPairing(client_id, callback); | 78 delegate_->GetPairing(client_id, callback); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void NotImplementedPairingRegistryDelegate::AddPairing( | |
| 82 const PairingRegistry::Pairing& new_paired_client, | |
| 83 const PairingRegistry::AddPairingCallback& callback) { | |
| 84 NOTIMPLEMENTED(); | |
| 85 if (!callback.is_null()) { | |
| 86 callback.Run(false); | |
| 87 } | |
| 88 } | |
| 89 | |
| 90 void NotImplementedPairingRegistryDelegate::GetPairing( | |
| 91 const std::string& client_id, | |
| 92 const PairingRegistry::GetPairingCallback& callback) { | |
| 93 NOTIMPLEMENTED(); | |
| 94 callback.Run(PairingRegistry::Pairing()); | |
| 95 } | |
| 96 | |
| 97 } // namespace protocol | 81 } // namespace protocol |
| 98 } // namespace remoting | 82 } // namespace remoting |
| OLD | NEW |