| Index: extensions/browser/api/cast_channel/cast_auth_util.cc
|
| diff --git a/extensions/browser/api/cast_channel/cast_auth_util.cc b/extensions/browser/api/cast_channel/cast_auth_util.cc
|
| index e2beca1870179241a76f4a2aab586859b8fca55b..eaccd8b59bc453ade4e92e453732baf9d3bf5d0b 100644
|
| --- a/extensions/browser/api/cast_channel/cast_auth_util.cc
|
| +++ b/extensions/browser/api/cast_channel/cast_auth_util.cc
|
| @@ -137,8 +137,11 @@ AuthResult AuthenticateChallengeReply(const CastMessage& challenge_reply,
|
| return result;
|
| }
|
|
|
| - if (response.client_auth_certificate().find(reinterpret_cast<const char*>(
|
| - kAudioOnlyPolicy)) != std::string::npos) {
|
| + const std::string& audio_policy =
|
| + std::string(reinterpret_cast<const char*>(kAudioOnlyPolicy),
|
| + (arraysize(kAudioOnlyPolicy) / sizeof(unsigned char)));
|
| + if (response.client_auth_certificate().find(audio_policy) !=
|
| + std::string::npos) {
|
| result.channel_policies |= AuthResult::POLICY_AUDIO_ONLY;
|
| }
|
|
|
|
|