| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef COMPONENTS_PROXIMITY_AUTH_SECURE_MESSAGE_DELEGATE_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_SECURE_MESSAGE_DELEGATE_H |
| 6 #define COMPONENTS_PROXIMITY_AUTH_SECURE_MESSAGE_DELEGATE_H | 6 #define COMPONENTS_PROXIMITY_AUTH_SECURE_MESSAGE_DELEGATE_H |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 11 #include "components/proximity_auth/cryptauth/proto/securemessage.pb.h" | 11 #include "components/cryptauth/proto/securemessage.pb.h" |
| 12 | 12 |
| 13 namespace proximity_auth { | 13 namespace cryptauth { |
| 14 | 14 |
| 15 // Interface of delegate responsible for cryptographic operations based on the | 15 // Interface of delegate responsible for cryptographic operations based on the |
| 16 // secure message library. This interface is asynchronous as the current | 16 // secure message library. This interface is asynchronous as the current |
| 17 // implementation on ChromeOS communicates with a daemon process over IPC. | 17 // implementation on ChromeOS communicates with a daemon process over IPC. |
| 18 class SecureMessageDelegate { | 18 class SecureMessageDelegate { |
| 19 public: | 19 public: |
| 20 // Fields specifying how to create a SecureMessage. | 20 // Fields specifying how to create a SecureMessage. |
| 21 struct CreateOptions { | 21 struct CreateOptions { |
| 22 CreateOptions(); | 22 CreateOptions(); |
| 23 CreateOptions(const CreateOptions& other); | 23 CreateOptions(const CreateOptions& other); |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 const std::string& payload, | 90 const std::string& payload, |
| 91 const securemessage::Header& header)> | 91 const securemessage::Header& header)> |
| 92 UnwrapSecureMessageCallback; | 92 UnwrapSecureMessageCallback; |
| 93 virtual void UnwrapSecureMessage( | 93 virtual void UnwrapSecureMessage( |
| 94 const std::string& serialized_message, | 94 const std::string& serialized_message, |
| 95 const std::string& key, | 95 const std::string& key, |
| 96 const UnwrapOptions& unwrap_options, | 96 const UnwrapOptions& unwrap_options, |
| 97 const UnwrapSecureMessageCallback& callback) = 0; | 97 const UnwrapSecureMessageCallback& callback) = 0; |
| 98 }; | 98 }; |
| 99 | 99 |
| 100 } // namespace proximity_auth | 100 } // namespace cryptauth |
| 101 | 101 |
| 102 #endif // COMPONENTS_PROXIMITY_AUTH_SECURE_MESSAGE_DELEGATE_H | 102 #endif // COMPONENTS_PROXIMITY_AUTH_SECURE_MESSAGE_DELEGATE_H |
| OLD | NEW |