Commit 3138d410 authored by Victor Costan's avatar Victor Costan Committed by Commit Bot

net: Remove deprecated IOBufferWithSize constructors.

Bug: 488553
Change-Id: Id732ac4eb5e5afc26095a925e73797449369c492
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2371471
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: default avatarEric Roman <eroman@chromium.org>
Commit-Queue: Eric Roman <eroman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801175}
parent 718ad0c6
...@@ -43,22 +43,10 @@ IOBuffer::~IOBuffer() { ...@@ -43,22 +43,10 @@ IOBuffer::~IOBuffer() {
data_ = nullptr; data_ = nullptr;
} }
IOBufferWithSize::IOBufferWithSize(int size)
: IOBuffer(size),
size_(size) {
AssertValidBufferSize(size);
}
IOBufferWithSize::IOBufferWithSize(size_t size) : IOBuffer(size), size_(size) { IOBufferWithSize::IOBufferWithSize(size_t size) : IOBuffer(size), size_(size) {
// Note: Size check is done in superclass' constructor. // Note: Size check is done in superclass' constructor.
} }
IOBufferWithSize::IOBufferWithSize(char* data, int size)
: IOBuffer(data),
size_(size) {
AssertValidBufferSize(size);
}
IOBufferWithSize::IOBufferWithSize(char* data, size_t size) IOBufferWithSize::IOBufferWithSize(char* data, size_t size)
: IOBuffer(data), size_(size) { : IOBuffer(data), size_(size) {
AssertValidBufferSize(size); AssertValidBufferSize(size);
......
...@@ -104,16 +104,11 @@ class NET_EXPORT IOBuffer : public base::RefCountedThreadSafe<IOBuffer> { ...@@ -104,16 +104,11 @@ class NET_EXPORT IOBuffer : public base::RefCountedThreadSafe<IOBuffer> {
// argument to IO functions. Please keep using IOBuffer* for API declarations. // argument to IO functions. Please keep using IOBuffer* for API declarations.
class NET_EXPORT IOBufferWithSize : public IOBuffer { class NET_EXPORT IOBufferWithSize : public IOBuffer {
public: public:
// TODO(eroman): Deprecated. Use the size_t flavor instead. crbug.com/488553
explicit IOBufferWithSize(int size);
explicit IOBufferWithSize(size_t size); explicit IOBufferWithSize(size_t size);
int size() const { return size_; } int size() const { return size_; }
protected: protected:
// TODO(eroman): Deprecated. Use the size_t flavor instead. crbug.com/488553
IOBufferWithSize(char* data, int size);
// Purpose of this constructor is to give a subclass access to the base class // Purpose of this constructor is to give a subclass access to the base class
// constructor IOBuffer(char*) thus allowing subclass to use underlying // constructor IOBuffer(char*) thus allowing subclass to use underlying
// memory it does not own. // memory it does not own.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment