diff options
author | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-23 21:24:27 +0000 |
---|---|---|
committer | mmenke@chromium.org <mmenke@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-23 21:24:27 +0000 |
commit | 5799a694a40b1c443788df56aa749d1c059577fd (patch) | |
tree | bcbee8114027864c8a81c0ca265d8642f70e8ca5 /net | |
parent | d2cb1fde3883bd2aa4603b8ab4ea3a48f082aa9c (diff) | |
download | chromium_src-5799a694a40b1c443788df56aa749d1c059577fd.zip chromium_src-5799a694a40b1c443788df56aa749d1c059577fd.tar.gz chromium_src-5799a694a40b1c443788df56aa749d1c059577fd.tar.bz2 |
Fix DCHECK when exporting an unnamed bookmark.
file_stream.h does not allow 0-bytes writes.
These bookmarks can now be exported, but not imported.
Also add documentation to file_stream.h to make it clearer
that 0-byte writes are forbidden.
BUG=179519
Review URL: https://codereview.chromium.org/12930003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190077 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/file_stream.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/base/file_stream.h b/net/base/file_stream.h index 763a03c..979aa84 100644 --- a/net/base/file_stream.h +++ b/net/base/file_stream.h @@ -150,6 +150,8 @@ class NET_EXPORT FileStream { // in-flight asynchronous operation. // // This method must not be called if the stream was opened READ_ONLY. + // + // Zero byte writes are not allowed. virtual int Write(IOBuffer* buf, int buf_len, const CompletionCallback& callback); @@ -161,6 +163,8 @@ class NET_EXPORT FileStream { // // The file must not be opened with PLATFORM_FILE_ASYNC. // This method must not be called if the stream was opened READ_ONLY. + // + // Zero byte writes are not allowed. virtual int WriteSync(const char* buf, int buf_len); // Truncates the file to be |bytes| length. This is only valid for writable |