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

Unified Diff: extensions/browser/api/cast_channel/cast_framer.cc

Issue 2891923004: [cast_channel] Make cast_channel related files not depend on "cast_channel.h" (Closed)
Patch Set: fix windows compile errors Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/api/cast_channel/cast_framer.cc
diff --git a/extensions/browser/api/cast_channel/cast_framer.cc b/extensions/browser/api/cast_channel/cast_framer.cc
index e4534159deb8c6403d9c94a92f8d23f73ea78b6d..0bd744fa17f653d5066550873fd91b7f6f22a748 100644
--- a/extensions/browser/api/cast_channel/cast_framer.cc
+++ b/extensions/browser/api/cast_channel/cast_framer.cc
@@ -119,7 +119,7 @@ std::unique_ptr<CastMessage> MessageFramer::Ingest(size_t num_bytes,
DCHECK(error);
DCHECK(message_length);
if (error_) {
- *error = CHANNEL_ERROR_INVALID_MESSAGE;
+ *error = ChannelError::INVALID_MESSAGE;
return nullptr;
}
@@ -127,7 +127,7 @@ std::unique_ptr<CastMessage> MessageFramer::Ingest(size_t num_bytes,
input_buffer_->offset());
CHECK_LE(num_bytes, BytesRequested());
message_bytes_received_ += num_bytes;
- *error = CHANNEL_ERROR_NONE;
+ *error = ChannelError::NONE;
*message_length = 0;
switch (current_element_) {
case HEADER:
@@ -136,7 +136,7 @@ std::unique_ptr<CastMessage> MessageFramer::Ingest(size_t num_bytes,
MessageHeader::Deserialize(input_buffer_->StartOfBuffer(), &header);
if (header.message_size > MessageHeader::max_message_size()) {
VLOG(1) << "Error parsing header (message size too large).";
- *error = CHANNEL_ERROR_INVALID_MESSAGE;
+ *error = ChannelError::INVALID_MESSAGE;
error_ = true;
return nullptr;
}
@@ -151,7 +151,7 @@ std::unique_ptr<CastMessage> MessageFramer::Ingest(size_t num_bytes,
input_buffer_->StartOfBuffer() + MessageHeader::header_size(),
body_size_)) {
VLOG(1) << "Error parsing packet body.";
- *error = CHANNEL_ERROR_INVALID_MESSAGE;
+ *error = ChannelError::INVALID_MESSAGE;
error_ = true;
return nullptr;
}
« no previous file with comments | « extensions/browser/api/cast_channel/cast_framer.h ('k') | extensions/browser/api/cast_channel/cast_framer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698