Home
last modified time | relevance | path

Searched refs:buffer_ (Results 1 – 25 of 398) sorted by relevance

12345678910>>...16

/external/chromium_org/media/base/
Dseekable_buffer_unittest.cc16 SeekableBufferTest() : buffer_(kBufferSize, kBufferSize) { in SeekableBufferTest()
39 SeekableBuffer buffer_; member in media::SeekableBufferTest
51 bool should_append = buffer_.Append(data_ + write_position, write_size); in TEST_F()
54 EXPECT_EQ(write_position - read_position, buffer_.forward_bytes()); in TEST_F()
55 EXPECT_EQ(should_append, buffer_.forward_bytes() < kBufferSize) in TEST_F()
60 int bytes_copied = buffer_.Peek(write_buffer_, copy_size); in TEST_F()
66 int bytes_read = buffer_.Read(write_buffer_, read_size); in TEST_F()
71 EXPECT_EQ(write_position - read_position, buffer_.forward_bytes()); in TEST_F()
81 bool should_append = buffer_.Append(data_ + j, kWriteSize); in TEST_F()
84 EXPECT_EQ(j + kWriteSize, buffer_.forward_bytes()); in TEST_F()
[all …]
/external/chromium/net/ftp/
Dftp_ctrl_response_buffer_unittest.cc17 return buffer_.ConsumeData(data, strlen(data)); in PushDataToBuffer()
20 net::FtpCtrlResponseBuffer buffer_; member in __anon017031b50111::FtpCtrlResponseBufferTest
24 EXPECT_FALSE(buffer_.ResponseAvailable()); in TEST_F()
27 EXPECT_TRUE(buffer_.ResponseAvailable()); in TEST_F()
29 net::FtpCtrlResponse response = buffer_.PopResponse(); in TEST_F()
30 EXPECT_FALSE(buffer_.ResponseAvailable()); in TEST_F()
38 EXPECT_FALSE(buffer_.ResponseAvailable()); in TEST_F()
40 EXPECT_FALSE(buffer_.ResponseAvailable()); in TEST_F()
42 EXPECT_FALSE(buffer_.ResponseAvailable()); in TEST_F()
44 EXPECT_FALSE(buffer_.ResponseAvailable()); in TEST_F()
[all …]
/external/chromium_org/net/ftp/
Dftp_ctrl_response_buffer_unittest.cc16 FtpCtrlResponseBufferTest() : buffer_(net::BoundNetLog()) { in FtpCtrlResponseBufferTest()
21 return buffer_.ConsumeData(data, strlen(data)); in PushDataToBuffer()
24 net::FtpCtrlResponseBuffer buffer_; member in __anonfa40efdc0111::FtpCtrlResponseBufferTest
28 EXPECT_FALSE(buffer_.ResponseAvailable()); in TEST_F()
31 EXPECT_TRUE(buffer_.ResponseAvailable()); in TEST_F()
33 net::FtpCtrlResponse response = buffer_.PopResponse(); in TEST_F()
34 EXPECT_FALSE(buffer_.ResponseAvailable()); in TEST_F()
42 EXPECT_FALSE(buffer_.ResponseAvailable()); in TEST_F()
44 EXPECT_FALSE(buffer_.ResponseAvailable()); in TEST_F()
46 EXPECT_FALSE(buffer_.ResponseAvailable()); in TEST_F()
[all …]
/external/protobuf/src/google/protobuf/io/
Dcoded_stream_unittest.cc129 static uint8 buffer_[kBufferSize]; member in google::protobuf::io::__anoncd8fed620111::CodedStreamTest
132 uint8 CodedStreamTest::buffer_[CodedStreamTest::kBufferSize]; member in google::protobuf::io::__anoncd8fed620111::CodedStreamTest
180 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_2D()
181 ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); in TEST_2D()
195 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_2D()
196 ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); in TEST_2D()
214 buffer_[0] = '\0'; in TEST_1D()
215 memcpy(buffer_ + 1, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_1D()
216 ArrayInputStream input(buffer_, sizeof(buffer_)); in TEST_1D()
246 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_1D()
[all …]
Dcoded_stream.cc71 buffer_end_ = buffer_; in BackUpInputToCurrentPosition()
172 buffer_ = NULL; in Skip()
173 buffer_end_ = buffer_; in Skip()
194 *data = buffer_; in GetDirectBufferPointer()
203 memcpy(buffer, buffer_, current_buffer_size); in ReadRaw()
210 memcpy(buffer, buffer_, size); in ReadRaw()
232 buffer->append(reinterpret_cast<const char*>(buffer_), in ReadStringFallback()
240 buffer->append(reinterpret_cast<const char*>(buffer_), size); in ReadStringFallback()
253 ptr = buffer_; in ReadLittleEndian32Fallback()
270 ptr = buffer_; in ReadLittleEndian64Fallback()
[all …]
/external/chromium_org/remoting/base/
Dtyped_buffer.h26 TypedBuffer() : buffer_(NULL), length_(0) { in MOVE_ONLY_TYPE_FOR_CPP_03()
30 explicit TypedBuffer(uint32 length) : buffer_(NULL), length_(length) { in TypedBuffer()
32 buffer_ = reinterpret_cast<T*>(new uint8[length_]); in TypedBuffer()
36 TypedBuffer(RValue rvalue) : buffer_(NULL), length_(0) { in TypedBuffer()
43 if (buffer_) { in ~TypedBuffer()
44 delete[] reinterpret_cast<uint8*>(buffer_); in ~TypedBuffer()
45 buffer_ = NULL; in ~TypedBuffer()
60 assert(buffer_ != NULL);
61 return *buffer_;
64 assert(buffer_ != NULL);
[all …]
/external/chromium_org/third_party/protobuf/src/google/protobuf/io/
Dcoded_stream_unittest.cc135 static uint8 buffer_[kBufferSize]; member in google::protobuf::io::__anon75d1bbb50111::CodedStreamTest
138 uint8 CodedStreamTest::buffer_[CodedStreamTest::kBufferSize]; member in google::protobuf::io::__anon75d1bbb50111::CodedStreamTest
186 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_2D()
187 ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); in TEST_2D()
201 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_2D()
202 ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); in TEST_2D()
247 buffer_[0] = '\0'; in TEST_1D()
248 memcpy(buffer_ + 1, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_1D()
249 ArrayInputStream input(buffer_, sizeof(buffer_)); in TEST_1D()
279 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_1D()
[all …]
/external/chromium_org/media/cast/framer/
Dframe_buffer_unittest.cc29 FrameBuffer buffer_; member in media::cast::FrameBufferTest
35 EXPECT_FALSE(buffer_.Complete()); in TEST_F()
36 EXPECT_FALSE(buffer_.is_key_frame()); in TEST_F()
39 EXPECT_FALSE(buffer_.GetEncodedVideoFrame(&frame, &rtp_timestamp)); in TEST_F()
43 buffer_.InsertPacket(payload_.data(), payload_.size(), rtp_header_); in TEST_F()
44 EXPECT_TRUE(buffer_.Complete()); in TEST_F()
45 EXPECT_FALSE(buffer_.is_key_frame()); in TEST_F()
48 EXPECT_TRUE(buffer_.GetEncodedVideoFrame(&frame, &rtp_timestamp)); in TEST_F()
55 buffer_.InsertPacket(payload_.data(), payload_.size(), rtp_header_); in TEST_F()
57 buffer_.InsertPacket(payload_.data(), payload_.size(), rtp_header_); in TEST_F()
[all …]
/external/chromium_org/net/tools/balsa/
Dbalsa_headers_test.cc23 buffer_.reset(new BalsaBuffer); in SetUp()
28 scoped_ptr<BalsaBuffer> buffer_; member in net::BalsaBufferTest
56 ASSERT_EQ(1u, buffer_->num_blocks()); in TEST_F()
61 StringPiece sp1 = buffer_->Write(StringPiece("hello"), &index1); in TEST_F()
62 StringPiece sp2 = buffer_->Write(StringPiece(", world"), &index2); in TEST_F()
64 ASSERT_EQ(2u, buffer_->num_blocks()); in TEST_F()
70 StringPiece(buffer_->GetPtr(1), buffer_->bytes_used(1))); in TEST_F()
79 StringPiece sp1 = buffer_->Write(as, &index1); in TEST_F()
80 StringPiece sp2 = buffer_->Write(bs, &index2); in TEST_F()
81 StringPiece sp3 = buffer_->Write(cs, &index3); in TEST_F()
[all …]
/external/chromium_org/content/browser/device_orientation/
Ddata_fetcher_shared_memory_win.cc100 DeviceOrientationHardwareBuffer* const buffer) : buffer_(buffer) {} in SensorEventSinkOrientation()
116 if (buffer_) { in UpdateSharedMemoryBuffer()
117 buffer_->seqlock.WriteBegin(); in UpdateSharedMemoryBuffer()
118 buffer_->data.alpha = alpha; in UpdateSharedMemoryBuffer()
119 buffer_->data.hasAlpha = has_alpha; in UpdateSharedMemoryBuffer()
120 buffer_->data.beta = beta; in UpdateSharedMemoryBuffer()
121 buffer_->data.hasBeta = has_beta; in UpdateSharedMemoryBuffer()
122 buffer_->data.gamma = gamma; in UpdateSharedMemoryBuffer()
123 buffer_->data.hasGamma = has_gamma; in UpdateSharedMemoryBuffer()
124 buffer_->data.absolute = true; in UpdateSharedMemoryBuffer()
[all …]
/external/chromium_org/v8/src/
Dregexp-macro-assembler-irregexp-inl.h46 ASSERT(pc_ <= buffer_.length()); in Emit()
47 if (pc_ + 3 >= buffer_.length()) { in Emit()
50 *reinterpret_cast<uint32_t*>(buffer_.start() + pc_) = word; in Emit()
56 ASSERT(pc_ <= buffer_.length()); in Emit16()
57 if (pc_ + 1 >= buffer_.length()) { in Emit16()
60 *reinterpret_cast<uint16_t*>(buffer_.start() + pc_) = word; in Emit16()
66 ASSERT(pc_ <= buffer_.length()); in Emit8()
67 if (pc_ == buffer_.length()) { in Emit8()
70 *reinterpret_cast<unsigned char*>(buffer_.start() + pc_) = word; in Emit8()
76 ASSERT(pc_ <= buffer_.length()); in Emit32()
[all …]
Dscanner-character-streams.cc45 buffer_cursor_ = buffer_; in BufferedUtf16CharacterStream()
46 buffer_end_ = buffer_; in BufferedUtf16CharacterStream()
57 if (pushback_limit_ == NULL && buffer_cursor_ > buffer_) { in PushBack()
59 buffer_[--buffer_cursor_ - buffer_] = static_cast<uc16>(character); in PushBack()
77 buffer_end_ = buffer_ + kBufferSize; in SlowPushBack()
81 ASSERT(buffer_cursor_ > buffer_); in SlowPushBack()
83 buffer_[--buffer_cursor_ - buffer_] = character; in SlowPushBack()
84 if (buffer_cursor_ == buffer_) { in SlowPushBack()
94 buffer_cursor_ = buffer_; in ReadBlock()
105 buffer_end_ = buffer_ + length; in ReadBlock()
[all …]
/external/chromium_org/third_party/leveldatabase/src/db/
Dlog_reader.cc24 buffer_(), in Reader()
75 uint64_t physical_record_offset = end_of_buffer_offset_ - buffer_.size(); in ReadRecord()
174 end_of_buffer_offset_ - buffer_.size() - bytes >= initial_offset_) { in ReportDrop()
181 if (buffer_.size() < kHeaderSize) { in ReadPhysicalRecord()
184 buffer_.clear(); in ReadPhysicalRecord()
185 Status status = file_->Read(kBlockSize, &buffer_, backing_store_); in ReadPhysicalRecord()
186 end_of_buffer_offset_ += buffer_.size(); in ReadPhysicalRecord()
188 buffer_.clear(); in ReadPhysicalRecord()
192 } else if (buffer_.size() < kBlockSize) { in ReadPhysicalRecord()
196 } else if (buffer_.size() == 0) { in ReadPhysicalRecord()
[all …]
/external/chromium_org/net/disk_cache/
Dmapped_file_avoid_mmap_posix.cc22 buffer_ = malloc(size); in Init()
24 if (buffer_ && snapshot_ && Read(buffer_, size, 0)) { in Init()
25 memcpy(snapshot_, buffer_, size); in Init()
27 free(buffer_); in Init()
29 buffer_ = snapshot_ = 0; in Init()
34 return buffer_; in Init()
38 DCHECK(buffer_); in Flush()
40 const char* buffer_ptr = static_cast<const char*>(buffer_); in Flush()
56 if (buffer_ && snapshot_) { in ~MappedFile()
59 free(buffer_); in ~MappedFile()
/external/chromium_org/chrome/renderer/net/
Dpredictor_queue.cc13 : buffer_(new char[size + 2]), in DnsQueue()
18 buffer_[buffer_sentinel_] = '\0'; // Guard byte to help reading data. in DnsQueue()
45 0 == strncmp(source, &buffer_[readable_], unsigned_length) && in Push()
46 '\0' == buffer_[readable_ + unsigned_length]) { in Push()
73 std::memcpy(&buffer_[dest], source, space_till_wrap); in Push()
77 DCHECK(static_cast<size_t>(space_till_wrap) == strlen(&buffer_[dest])); in Push()
85 std::memcpy(&buffer_[dest], source, length); in Push()
87 buffer_[dest + length] = '\0'; // We need termination in our buffer. in Push()
89 DCHECK(static_cast<size_t>(length) == strlen(&buffer_[dest])); in Push()
108 DCHECK('\0' == buffer_[buffer_sentinel_]); in Pop()
[all …]
/external/chromium_org/third_party/leveldatabase/src/table/
Dblock_builder.cc49 buffer_.clear(); in Reset()
58 return (buffer_.size() + // Raw data buffer in CurrentSizeEstimate()
66 PutFixed32(&buffer_, restarts_[i]); in Finish()
68 PutFixed32(&buffer_, restarts_.size()); in Finish()
70 return Slice(buffer_); in Finish()
77 assert(buffer_.empty() // No values yet? in Add()
88 restarts_.push_back(buffer_.size()); in Add()
94 PutVarint32(&buffer_, shared); in Add()
95 PutVarint32(&buffer_, non_shared); in Add()
96 PutVarint32(&buffer_, value.size()); in Add()
[all …]
/external/chromium_org/ppapi/native_client/src/untrusted/nacl_ppapi_util/
Dstring_buffer.cc16 buffer_ = reinterpret_cast<char *>(malloc(nbytes_)); in StringBuffer()
17 if (NULL == buffer_) { in StringBuffer()
21 buffer_[0] = '\0'; in StringBuffer()
26 buffer_[0] = '\0'; in DiscardOutput()
32 free(buffer_); in ~StringBuffer()
33 buffer_ = NULL; in ~StringBuffer()
45 insert_pt = buffer_ + insert_; in Printf()
54 new_buffer = reinterpret_cast<char *>(realloc(buffer_, 2 * nbytes_)); in Printf()
61 buffer_ = new_buffer; in Printf()
/external/v8/src/
Dregexp-macro-assembler-irregexp-inl.h46 ASSERT(pc_ <= buffer_.length()); in Emit()
47 if (pc_ + 3 >= buffer_.length()) { in Emit()
50 *reinterpret_cast<uint32_t*>(buffer_.start() + pc_) = word; in Emit()
56 ASSERT(pc_ <= buffer_.length()); in Emit16()
57 if (pc_ + 1 >= buffer_.length()) { in Emit16()
60 *reinterpret_cast<uint16_t*>(buffer_.start() + pc_) = word; in Emit16()
66 ASSERT(pc_ <= buffer_.length()); in Emit32()
67 if (pc_ + 3 >= buffer_.length()) { in Emit32()
70 *reinterpret_cast<uint32_t*>(buffer_.start() + pc_) = word; in Emit32()
Dscanner-character-streams.cc45 buffer_cursor_ = buffer_; in BufferedUtf16CharacterStream()
46 buffer_end_ = buffer_; in BufferedUtf16CharacterStream()
56 if (pushback_limit_ == NULL && buffer_cursor_ > buffer_) { in PushBack()
58 buffer_[--buffer_cursor_ - buffer_] = static_cast<uc16>(character); in PushBack()
76 buffer_end_ = buffer_ + kBufferSize; in SlowPushBack()
80 ASSERT(buffer_cursor_ > buffer_); in SlowPushBack()
82 buffer_[--buffer_cursor_ - buffer_] = character; in SlowPushBack()
83 if (buffer_cursor_ == buffer_) { in SlowPushBack()
93 buffer_cursor_ = buffer_; in ReadBlock()
104 buffer_end_ = buffer_ + length; in ReadBlock()
[all …]
/external/chromium_org/net/socket/
Dsocks5_client_socket.cc62 buffer_.clear(); in Connect()
266 if (buffer_.empty()) { in DoGreetWrite()
267 buffer_ = std::string(kSOCKS5GreetWriteData, in DoGreetWrite()
273 size_t handshake_buf_len = buffer_.size() - bytes_sent_; in DoGreetWrite()
275 memcpy(handshake_buf_->data(), &buffer_.data()[bytes_sent_], in DoGreetWrite()
286 if (bytes_sent_ == buffer_.size()) { in DoGreetWriteComplete()
287 buffer_.clear(); in DoGreetWriteComplete()
314 buffer_.append(handshake_buf_->data(), result); in DoGreetReadComplete()
321 if (buffer_[0] != kSOCKS5Version) { in DoGreetReadComplete()
323 NetLog::IntegerCallback("version", buffer_[0])); in DoGreetReadComplete()
[all …]
/external/chromium/net/socket/
Dsocks5_client_socket.cc89 buffer_.clear(); in Connect()
269 if (buffer_.empty()) { in DoGreetWrite()
270 buffer_ = std::string(kSOCKS5GreetWriteData, in DoGreetWrite()
276 size_t handshake_buf_len = buffer_.size() - bytes_sent_; in DoGreetWrite()
278 memcpy(handshake_buf_->data(), &buffer_.data()[bytes_sent_], in DoGreetWrite()
289 if (bytes_sent_ == buffer_.size()) { in DoGreetWriteComplete()
290 buffer_.clear(); in DoGreetWriteComplete()
318 buffer_.append(handshake_buf_->data(), result); in DoGreetReadComplete()
325 if (buffer_[0] != kSOCKS5Version) { in DoGreetReadComplete()
328 make_scoped_refptr(new NetLogIntegerParameter("version", buffer_[0]))); in DoGreetReadComplete()
[all …]
/external/chromium_org/sandbox/win/src/
Dinternal_types.h31 CountedBuffer(void* buffer, uint32 size) : size_(size), buffer_(buffer) {} in CountedBuffer()
38 return buffer_; in Buffer()
43 void* buffer_; variable
51 buffer_.vp = buffer; in IPCInt()
55 buffer_.vp = NULL; in IPCInt()
56 buffer_.i32 = i32; in IPCInt()
60 return buffer_.i32; in As32Bit()
64 return buffer_.vp; in AsVoidPtr()
71 } buffer_; variable
/external/chromium_org/media/cdm/ppapi/
Dcdm_helpers.h40 virtual uint32_t Capacity() const OVERRIDE { return buffer_.size(); } in Capacity()
43 return static_cast<uint8_t*>(buffer_.data()); in Data()
58 pp::Buffer_Dev buffer_dev() const { return buffer_; } in buffer_dev()
64 : buffer_(buffer), in PpbBuffer()
69 pp::Buffer_Dev buffer_; variable
106 DecryptedBlockImpl() : buffer_(NULL), timestamp_(0) {} in DecryptedBlockImpl()
107 virtual ~DecryptedBlockImpl() { if (buffer_) buffer_->Destroy(); } in ~DecryptedBlockImpl()
110 buffer_ = static_cast<PpbBuffer*>(buffer); in SetDecryptedBuffer()
112 virtual cdm::Buffer* DecryptedBuffer() OVERRIDE { return buffer_; } in DecryptedBuffer()
120 PpbBuffer* buffer_;
[all …]
/external/chromium_org/chrome/installer/mini_installer/
Dmini_string.h76 buffer_[kCapacity] = L'\0'; // We always reserve 1 more than asked for. in StackString()
90 return buffer_; in get()
94 return SafeStrCopy(buffer_, kCapacity, str); in assign()
98 return SafeStrCat(buffer_, kCapacity, str); in append()
102 buffer_[0] = L'\0'; in clear()
106 return SafeStrLen(buffer_, kCapacity); in length()
111 return SearchStringI(buffer_, find); in findi()
116 return lstrcmpiW(buffer_, str); in comparei()
121 return lstrcmpW(buffer_, str); in compare()
130 buffer_[location] = L'\0'; in truncate_at()
[all …]
/external/chromium/webkit/glue/media/
Dbuffered_resource_loader.cc51 : buffer_(new media::SeekableBuffer(kBackwardCapcity, kForwardCapacity)), in BufferedResourceLoader()
131 if (!buffer_.get()) in Stop()
135 buffer_.reset(); in Stop()
154 DCHECK(buffer_.get()); in Read()
205 if (buffer_.get()) in GetBufferedPosition()
206 return offset_ + static_cast<int>(buffer_->forward_bytes()) - 1; in GetBufferedPosition()
343 if (!buffer_.get()) in didReceiveData()
347 buffer_->Append(reinterpret_cast<const uint8*>(data), data_length); in didReceiveData()
357 if (buffer_->forward_bytes() > buffer_->forward_capacity()) { in didReceiveData()
358 size_t excess = buffer_->forward_bytes() - buffer_->forward_capacity(); in didReceiveData()
[all …]

12345678910>>...16