diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-11 20:55:54 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-11 20:55:54 +0000 |
commit | bbbb0374bb19b2a09d54d3da26373ba5b5400f0a (patch) | |
tree | a0c03543c6a16382f0c2d28f0d3a204637b4d0fa /net/base/io_buffer.cc | |
parent | 2590ff7e34aa000603660703a0482a22a04db0f6 (diff) | |
download | chromium_src-bbbb0374bb19b2a09d54d3da26373ba5b5400f0a.zip chromium_src-bbbb0374bb19b2a09d54d3da26373ba5b5400f0a.tar.gz chromium_src-bbbb0374bb19b2a09d54d3da26373ba5b5400f0a.tar.bz2 |
Minor nits in IO buffer
While doing restructuring work on filters, I read some of the IObuffer code,
and it scared me a bit that there was a public constructor taking a data
buffer that was then destroyed. After searching around for how this was used,
I realized it is only used by the derived class, and thought that making it
protected would save other folks from wondering/searching/checking.
Since the size type in other constuctory was int rather than size_t,
I also added a DCHECK (mostly out of paranoia).
r=rvargas
Review URL: http://codereview.chromium.org/43086
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11479 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/io_buffer.cc')
-rw-r--r-- | net/base/io_buffer.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/base/io_buffer.cc b/net/base/io_buffer.cc index c9b4532..c2401ab 100644 --- a/net/base/io_buffer.cc +++ b/net/base/io_buffer.cc @@ -9,7 +9,7 @@ namespace net { IOBuffer::IOBuffer(int buffer_size) { - DCHECK(buffer_size); + DCHECK(buffer_size > 0); data_ = new char[buffer_size]; } |