| Index: chrome/common/net/test_url_fetcher_factory.h
|
| diff --git a/chrome/common/net/test_url_fetcher_factory.h b/chrome/common/net/test_url_fetcher_factory.h
|
| index 65625a40907d215dd15d275554b72dd6911d94b1..8b5dbe4dfd25618beba69773e1905e6b1d6e604b 100644
|
| --- a/chrome/common/net/test_url_fetcher_factory.h
|
| +++ b/chrome/common/net/test_url_fetcher_factory.h
|
| @@ -51,6 +51,10 @@ class TestURLFetcher : public URLFetcher {
|
| // Overriden to do nothing. It is assumed the caller will notify the delegate.
|
| virtual void Start() {}
|
|
|
| + // Overriden to cache the chunks uploaded. Caller can read back the uploaded
|
| + // chunks with the upload_data() accessor.
|
| + virtual void AppendChunkToUpload(const std::string& data, bool is_last_chunk);
|
| +
|
| // Unique ID in our factory.
|
| int id() const { return id_; }
|
|
|
| @@ -62,12 +66,17 @@ class TestURLFetcher : public URLFetcher {
|
| // Returns the data uploaded on this URLFetcher.
|
| const std::string& upload_data() const { return URLFetcher::upload_data(); }
|
|
|
| + // Returns the chunks of data uploaded on this URLFetcher.
|
| + const std::list<std::string>& upload_chunks() const { return chunks_; }
|
| +
|
| // Returns the delegate installed on the URLFetcher.
|
| Delegate* delegate() const { return URLFetcher::delegate(); }
|
|
|
| private:
|
| const int id_;
|
| const GURL original_url_;
|
| + std::list<std::string> chunks_;
|
| + bool did_receive_last_chunk_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TestURLFetcher);
|
| };
|
|
|