Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_ api.h" | |
| 6 | |
| 7 #include "chrome/common/extensions/api/easy_unlock_private.h" | |
| 8 | |
| 9 namespace extensions { | |
| 10 namespace api { | |
| 11 | |
| 12 EasyUnlockPrivatePerformECDHKeyAgreementFunction:: | |
| 13 EasyUnlockPrivatePerformECDHKeyAgreementFunction() {} | |
| 14 | |
| 15 EasyUnlockPrivatePerformECDHKeyAgreementFunction:: | |
| 16 ~EasyUnlockPrivatePerformECDHKeyAgreementFunction() {} | |
| 17 | |
| 18 bool EasyUnlockPrivatePerformECDHKeyAgreementFunction::RunAsync() { | |
| 19 return false; | |
|
Tim Song
2014/07/15 23:37:56
Is this intentionally empty?
tbarzic
2014/07/16 00:01:41
yes, I'll add the implementation in subsequent cl
| |
| 20 } | |
| 21 | |
| 22 void EasyUnlockPrivatePerformECDHKeyAgreementFunction::OnData( | |
| 23 const std::string& secret_key) { | |
| 24 if (!secret_key.empty()) { | |
| 25 results_ = easy_unlock_private::PerformECDHKeyAgreement::Results::Create( | |
| 26 secret_key); | |
| 27 } | |
| 28 SendResponse(true); | |
| 29 } | |
| 30 | |
| 31 EasyUnlockPrivateGenerateEcP256KeyPairFunction:: | |
| 32 EasyUnlockPrivateGenerateEcP256KeyPairFunction() {} | |
| 33 | |
| 34 EasyUnlockPrivateGenerateEcP256KeyPairFunction:: | |
| 35 ~EasyUnlockPrivateGenerateEcP256KeyPairFunction() {} | |
| 36 | |
| 37 bool EasyUnlockPrivateGenerateEcP256KeyPairFunction::RunAsync() { | |
| 38 return false; | |
| 39 } | |
| 40 | |
| 41 void EasyUnlockPrivateGenerateEcP256KeyPairFunction::OnData( | |
| 42 const std::string& public_key, | |
| 43 const std::string& private_key) { | |
| 44 if (!public_key.empty() && !private_key.empty()) { | |
| 45 results_ = easy_unlock_private::GenerateEcP256KeyPair::Results::Create( | |
| 46 public_key, private_key); | |
| 47 } | |
| 48 SendResponse(true); | |
| 49 } | |
| 50 | |
| 51 EasyUnlockPrivateCreateSecureMessageFunction:: | |
| 52 EasyUnlockPrivateCreateSecureMessageFunction() {} | |
| 53 | |
| 54 EasyUnlockPrivateCreateSecureMessageFunction:: | |
| 55 ~EasyUnlockPrivateCreateSecureMessageFunction() {} | |
| 56 | |
| 57 bool EasyUnlockPrivateCreateSecureMessageFunction::RunAsync() { | |
| 58 return false; | |
| 59 } | |
| 60 | |
| 61 void EasyUnlockPrivateCreateSecureMessageFunction::OnData( | |
| 62 const std::string& message) { | |
| 63 if (!message.empty()) { | |
| 64 results_ = easy_unlock_private::CreateSecureMessage::Results::Create( | |
| 65 message); | |
| 66 } | |
| 67 SendResponse(true); | |
| 68 } | |
| 69 | |
| 70 EasyUnlockPrivateUnwrapSecureMessageFunction:: | |
| 71 EasyUnlockPrivateUnwrapSecureMessageFunction() {} | |
| 72 | |
| 73 EasyUnlockPrivateUnwrapSecureMessageFunction:: | |
| 74 ~EasyUnlockPrivateUnwrapSecureMessageFunction() {} | |
| 75 | |
| 76 bool EasyUnlockPrivateUnwrapSecureMessageFunction::RunAsync() { | |
| 77 return false; | |
| 78 } | |
| 79 | |
| 80 void EasyUnlockPrivateUnwrapSecureMessageFunction::OnData( | |
| 81 const std::string& data) { | |
| 82 if (!data.empty()) | |
| 83 results_ = easy_unlock_private::UnwrapSecureMessage::Results::Create(data); | |
| 84 SendResponse(true); | |
| 85 } | |
| 86 | |
| 87 } // namespace api | |
| 88 } // namespace extensions | |
| OLD | NEW |