summaryrefslogtreecommitdiffstats
path: root/chrome_frame/urlmon_url_request.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome_frame/urlmon_url_request.h')
-rw-r--r--chrome_frame/urlmon_url_request.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/chrome_frame/urlmon_url_request.h b/chrome_frame/urlmon_url_request.h
index fc98e8f..d4abee5 100644
--- a/chrome_frame/urlmon_url_request.h
+++ b/chrome_frame/urlmon_url_request.h
@@ -215,24 +215,22 @@ END_MSG_MAP()
// size less than 2GB
class Cache {
public:
- bool Create();
-
// Adds data to the end of the cache.
bool Append(IStream* source, size_t* bytes_copied);
// Reads from the cache.
bool Read(IStream* dest, size_t size, size_t* bytes_copied);
- size_t Size();
- size_t CurrentPos();
- size_t SizeRemaining();
- void Clear();
+ // Returns the size of the cache.
+ size_t Size() const;
+
+ // Returns true if the cache has valid data.
bool is_valid() const {
- return (stream_ != NULL);
+ return Size() != 0;
}
protected:
- ScopedComPtr<IStream> stream_;
+ std::vector<byte> cache_;
char read_buffer_[kCopyChunkSize];
};