Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_MESSAGE_UTIL_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_MESSAGE_UTIL_H_ |
| 6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_MESSAGE_UTIL_H_ | 6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_MESSAGE_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 namespace extensions { | 10 namespace extensions { |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 bool CastMessageToMessageInfo(const CastMessage& message_proto, | 26 bool CastMessageToMessageInfo(const CastMessage& message_proto, |
| 27 MessageInfo* message); | 27 MessageInfo* message); |
| 28 | 28 |
| 29 // Returns a human readable string for |message_proto|. | 29 // Returns a human readable string for |message_proto|. |
| 30 std::string CastMessageToString(const CastMessage& message_proto); | 30 std::string CastMessageToString(const CastMessage& message_proto); |
| 31 | 31 |
| 32 // Returns a human readable string for |message|. | 32 // Returns a human readable string for |message|. |
| 33 std::string AuthMessageToString(const DeviceAuthMessage& message); | 33 std::string AuthMessageToString(const DeviceAuthMessage& message); |
| 34 | 34 |
| 35 // Fills |message_proto| appropriately for an auth challenge request message. | 35 // Fills |message_proto| appropriately for an auth challenge request message. |
| 36 void CreateAuthChallengeMessage(CastMessage* message_proto); | 36 // Uses the challenge |nonce|. |
| 37 void CreateAuthChallengeMessage(CastMessage* message_proto, std::string nonce); | |
|
mark a. foltz
2017/02/27 23:04:32
const std::string&
ryanchung
2017/03/01 20:09:47
Done.
| |
| 37 | 38 |
| 38 // Returns whether the given message is an auth handshake message. | 39 // Returns whether the given message is an auth handshake message. |
| 39 bool IsAuthMessage(const CastMessage& message); | 40 bool IsAuthMessage(const CastMessage& message); |
| 40 | 41 |
| 41 } // namespace cast_channel | 42 } // namespace cast_channel |
| 42 } // namespace api | 43 } // namespace api |
| 43 } // namespace extensions | 44 } // namespace extensions |
| 44 | 45 |
| 45 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_MESSAGE_UTIL_H_ | 46 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_CAST_MESSAGE_UTIL_H_ |
| OLD | NEW |