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

Side by Side Diff: extensions/browser/api/cast_channel/logger_util.h

Issue 588433002: Revert "Make protobuf enums canonical for ReadState/WriteState/ConnectState." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 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_LOGGER_UTIL_H_ 5 #ifndef EXTENSIONS_BROWSER_API_CAST_CHANNEL_LOGGER_UTIL_H_
6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_LOGGER_UTIL_H_ 6 #define EXTENSIONS_BROWSER_API_CAST_CHANNEL_LOGGER_UTIL_H_
7 7
8 #include "extensions/browser/api/cast_channel/logging.pb.h" 8 #include "extensions/browser/api/cast_channel/logging.pb.h"
9 #include "extensions/common/api/cast_channel.h"
10 9
11 namespace extensions { 10 namespace extensions {
12 namespace core_api { 11 namespace core_api {
13 namespace cast_channel { 12 namespace cast_channel {
14 // Converts an IDL "ChannelError" to a proto enum "ErrorState".
15 proto::ErrorState ErrorStateToProto(ChannelError state);
16 13
17 // Converts an IDL "ReadyState" to a proto enum "ReadyState". 14 // TODO(mfoltz): Move the *ToProto functions from cast_socket.cc here.
18 proto::ReadyState ReadyStateToProto(ReadyState state); 15 // CastSocket should not need to know details of the logging protocol message.
19 16
20 // Holds the most recent errors encountered by a CastSocket. 17 // Holds the most recent errors encountered by a CastSocket.
21 struct LastErrors { 18 struct LastErrors {
22 public: 19 public:
23 LastErrors(); 20 LastErrors();
24 ~LastErrors(); 21 ~LastErrors();
25 22
26 // The most recent event that occurred at the time of the error. 23 // The most recent event that occurred at the time of the error.
27 proto::EventType event_type; 24 proto::EventType event_type;
28 25
29 // The most recent ChallengeReplyErrorType logged for the socket. 26 // The most recent ChallengeReplyErrorType logged for the socket.
30 proto::ChallengeReplyErrorType challenge_reply_error_type; 27 proto::ChallengeReplyErrorType challenge_reply_error_type;
31 28
32 // The most recent net_return_value logged for the socket. 29 // The most recent net_return_value logged for the socket.
33 int net_return_value; 30 int net_return_value;
34 31
35 // The most recent NSS error logged for the socket. 32 // The most recent NSS error logged for the socket.
36 int nss_error_code; 33 int nss_error_code;
37 }; 34 };
38 35
39 } // namespace cast_channel 36 } // namespace cast_channel
40 } // namespace api 37 } // namespace api
41 } // namespace extensions 38 } // namespace extensions
42 39
43 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_LOGGER_UTIL_H_ 40 #endif // EXTENSIONS_BROWSER_API_CAST_CHANNEL_LOGGER_UTIL_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/cast_channel/cast_socket.cc ('k') | extensions/browser/api/cast_channel/logger_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698