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

Side by Side Diff: webrtc/base/buffer.h

Issue 2163683003: Relanding: Allow the DTLS fingerprint verification to occur after the handshake. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Responding to Peter's comments. Created 4 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
« no previous file with comments | « no previous file | webrtc/base/buffer_unittest.cc » ('j') | webrtc/base/opensslstreamadapter.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 size_t size() const { 127 size_t size() const {
128 RTC_DCHECK(IsConsistent()); 128 RTC_DCHECK(IsConsistent());
129 return size_; 129 return size_;
130 } 130 }
131 131
132 size_t capacity() const { 132 size_t capacity() const {
133 RTC_DCHECK(IsConsistent()); 133 RTC_DCHECK(IsConsistent());
134 return capacity_; 134 return capacity_;
135 } 135 }
136 136
137 bool empty() const { return size() == 0u; }
138
137 BufferT& operator=(BufferT&& buf) { 139 BufferT& operator=(BufferT&& buf) {
138 RTC_DCHECK(IsConsistent()); 140 RTC_DCHECK(IsConsistent());
139 RTC_DCHECK(buf.IsConsistent()); 141 RTC_DCHECK(buf.IsConsistent());
140 size_ = buf.size_; 142 size_ = buf.size_;
141 capacity_ = buf.capacity_; 143 capacity_ = buf.capacity_;
142 data_ = std::move(buf.data_); 144 data_ = std::move(buf.data_);
143 buf.OnMovedFrom(); 145 buf.OnMovedFrom();
144 return *this; 146 return *this;
145 } 147 }
146 148
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 size_t capacity_; 351 size_t capacity_;
350 std::unique_ptr<T[]> data_; 352 std::unique_ptr<T[]> data_;
351 }; 353 };
352 354
353 // By far the most common sort of buffer. 355 // By far the most common sort of buffer.
354 using Buffer = BufferT<uint8_t>; 356 using Buffer = BufferT<uint8_t>;
355 357
356 } // namespace rtc 358 } // namespace rtc
357 359
358 #endif // WEBRTC_BASE_BUFFER_H_ 360 #endif // WEBRTC_BASE_BUFFER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/base/buffer_unittest.cc » ('j') | webrtc/base/opensslstreamadapter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698