Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(712)

Side by Side Diff: extensions/browser/api/cast_channel/cast_channel_enum_util.cc

Issue 2942743002: [cast_channel] Clean up CastSocketImpl ctor parameters (Closed)
Patch Set: fix compile error Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "extensions/browser/api/cast_channel/cast_channel_enum_util.h" 5 #include "extensions/browser/api/cast_channel/cast_channel_enum_util.h"
6 6
7 namespace extensions { 7 namespace extensions {
8 namespace api { 8 namespace api {
9 namespace cast_channel { 9 namespace cast_channel {
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 case ::cast_channel::ChannelError::PING_TIMEOUT: 50 case ::cast_channel::ChannelError::PING_TIMEOUT:
51 return CHANNEL_ERROR_PING_TIMEOUT; 51 return CHANNEL_ERROR_PING_TIMEOUT;
52 case ::cast_channel::ChannelError::UNKNOWN: 52 case ::cast_channel::ChannelError::UNKNOWN:
53 return CHANNEL_ERROR_UNKNOWN; 53 return CHANNEL_ERROR_UNKNOWN;
54 } 54 }
55 NOTREACHED() << "Unknown channel_error " 55 NOTREACHED() << "Unknown channel_error "
56 << ChannelErrorToString(channel_error); 56 << ChannelErrorToString(channel_error);
57 return CHANNEL_ERROR_NONE; 57 return CHANNEL_ERROR_NONE;
58 } 58 }
59 59
60 api::cast_channel::ChannelAuthType ToChannelAuthType(
61 ::cast_channel::ChannelAuthType channel_auth) {
62 switch (channel_auth) {
63 case ::cast_channel::ChannelAuthType::NONE:
64 return CHANNEL_AUTH_TYPE_NONE;
65 case ::cast_channel::ChannelAuthType::SSL_VERIFIED:
66 return CHANNEL_AUTH_TYPE_SSL_VERIFIED;
67 }
68 NOTREACHED() << "Unknown channel_auth "
69 << ChannelAuthTypeToString(channel_auth);
70 return CHANNEL_AUTH_TYPE_NONE;
71 }
72
73 ::cast_channel::ChannelAuthType ToChannelAuthTypeInternal(
74 api::cast_channel::ChannelAuthType channel_auth) {
75 switch (channel_auth) {
76 case CHANNEL_AUTH_TYPE_NONE:
77 return ::cast_channel::ChannelAuthType::NONE;
78 case CHANNEL_AUTH_TYPE_SSL_VERIFIED:
79 return ::cast_channel::ChannelAuthType::SSL_VERIFIED;
80 }
81 NOTREACHED() << "Unknown channel_auth " << channel_auth;
82 return ::cast_channel::ChannelAuthType::NONE;
83 }
84
85 } // namespace cast_channel 60 } // namespace cast_channel
86 } // namespace api 61 } // namespace api
87 } // namespace extensions 62 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698