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

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

Issue 1226353004: Generate all extension schema namespaces as "api" and instead vary the generated bundle names. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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 #include "extensions/browser/api/cast_channel/cast_framer.h" 5 #include "extensions/browser/api/cast_channel/cast_framer.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include "base/numerics/safe_conversions.h" 9 #include "base/numerics/safe_conversions.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
11 #include "base/sys_byteorder.h" 11 #include "base/sys_byteorder.h"
12 #include "extensions/common/api/cast_channel/cast_channel.pb.h" 12 #include "extensions/common/api/cast_channel/cast_channel.pb.h"
13 13
14 namespace extensions { 14 namespace extensions {
15 namespace core_api { 15 namespace api {
16 namespace cast_channel { 16 namespace cast_channel {
17 MessageFramer::MessageFramer(scoped_refptr<net::GrowableIOBuffer> input_buffer) 17 MessageFramer::MessageFramer(scoped_refptr<net::GrowableIOBuffer> input_buffer)
18 : input_buffer_(input_buffer), error_(false) { 18 : input_buffer_(input_buffer), error_(false) {
19 Reset(); 19 Reset();
20 } 20 }
21 21
22 MessageFramer::~MessageFramer() { 22 MessageFramer::~MessageFramer() {
23 } 23 }
24 24
25 MessageFramer::MessageHeader::MessageHeader() : message_size(0) { 25 MessageFramer::MessageHeader::MessageHeader() : message_size(0) {
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 169
170 void MessageFramer::Reset() { 170 void MessageFramer::Reset() {
171 current_element_ = HEADER; 171 current_element_ = HEADER;
172 message_bytes_received_ = 0; 172 message_bytes_received_ = 0;
173 body_size_ = 0; 173 body_size_ = 0;
174 input_buffer_->set_offset(0); 174 input_buffer_->set_offset(0);
175 } 175 }
176 176
177 } // namespace cast_channel 177 } // namespace cast_channel
178 } // namespace core_api 178 } // namespace api
179 } // namespace extensions 179 } // namespace extensions
OLDNEW
« 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