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

Unified Diff: components/cast_channel/cast_framer.cc

Issue 2913033003: [cast_channel] Move cast_channel related files from //extensions to //components (Closed)
Patch Set: fix buildbot compile errors 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/cast_channel/cast_framer.h ('k') | components/cast_channel/cast_framer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cast_channel/cast_framer.cc
diff --git a/extensions/browser/api/cast_channel/cast_framer.cc b/components/cast_channel/cast_framer.cc
similarity index 93%
rename from extensions/browser/api/cast_channel/cast_framer.cc
rename to components/cast_channel/cast_framer.cc
index 0bd744fa17f653d5066550873fd91b7f6f22a748..9b5d6fe5122b360966ddc9f7291a78b16f8fd7d6 100644
--- a/extensions/browser/api/cast_channel/cast_framer.cc
+++ b/components/cast_channel/cast_framer.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "extensions/browser/api/cast_channel/cast_framer.h"
+#include "components/cast_channel/cast_framer.h"
#include <stdlib.h>
@@ -12,21 +12,17 @@
#include "base/numerics/safe_conversions.h"
#include "base/strings/string_number_conversions.h"
#include "base/sys_byteorder.h"
-#include "extensions/common/api/cast_channel/cast_channel.pb.h"
+#include "components/cast_channel/proto/cast_channel.pb.h"
-namespace extensions {
-namespace api {
namespace cast_channel {
MessageFramer::MessageFramer(scoped_refptr<net::GrowableIOBuffer> input_buffer)
: input_buffer_(input_buffer), error_(false) {
Reset();
}
-MessageFramer::~MessageFramer() {
-}
+MessageFramer::~MessageFramer() {}
-MessageFramer::MessageHeader::MessageHeader() : message_size(0) {
-}
+MessageFramer::MessageHeader::MessageHeader() : message_size(0) {}
void MessageFramer::MessageHeader::SetMessageSize(size_t size) {
DCHECK_LT(size, static_cast<size_t>(std::numeric_limits<uint32_t>::max()));
@@ -102,9 +98,8 @@ size_t MessageFramer::BytesRequested() {
case BODY:
bytes_left =
(body_size_ + MessageHeader::header_size()) - message_bytes_received_;
- DCHECK_LE(
- bytes_left,
- MessageHeader::max_message_size() - MessageHeader::header_size());
+ DCHECK_LE(bytes_left, MessageHeader::max_message_size() -
+ MessageHeader::header_size());
VLOG(2) << "Bytes needed for body: " << bytes_left;
return bytes_left;
default:
@@ -177,5 +172,3 @@ void MessageFramer::Reset() {
}
} // namespace cast_channel
-} // namespace api
-} // namespace extensions
« no previous file with comments | « components/cast_channel/cast_framer.h ('k') | components/cast_channel/cast_framer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698