Commit 98573284 authored by jar@chromium.org's avatar jar@chromium.org

Fix minor error it SDCH filter code (hidden by filter control code)

The controlling code in filter.cc doesn't significantly distinguish
FILTER_OK and FILTER_NEEDS_MORE_DATA, but we *should* transition
to a semantic where FILTER_OK becomes instead "FILTER_NEEDS_OUTPUT_SPACE"
and then we'd need to do this uniformly for all filter code.
We *could* then improve the driving filter code (for example, not have
to sniff output buffer usage to deduce that the filter wanted to be 
called again to emit more data).

r=huanr
Review URL: http://codereview.chromium.org/28193

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10544 0039d316-1c4b-4281-b951-d872f2087c98
parent 668e1073
......@@ -250,6 +250,7 @@ Filter::FilterStatus SdchFilter::ReadFilteredData(char* dest_buffer,
amount = OutputBufferExcess(dest_buffer, available_space);
*dest_len += amount;
dest_buffer += amount;
available_space -= amount;
if (0 == available_space && !dest_buffer_excess_.empty())
return FILTER_OK;
return FILTER_NEED_MORE_DATA;
......
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