Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(547)

Unified Diff: chrome/browser/extensions/api/web_request/upload_data_presenter.h

Issue 11419034: net: Move ownership of UploadDataStream from URLRequestHttpJob to URLRequest (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove a local variable Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/web_request/upload_data_presenter.h
diff --git a/chrome/browser/extensions/api/web_request/upload_data_presenter.h b/chrome/browser/extensions/api/web_request/upload_data_presenter.h
index a99086b6aebbbc4fb261b7114ba98279c6f9c17e..3579b93c195066afead886b0c5220aa560046a25 100644
--- a/chrome/browser/extensions/api/web_request/upload_data_presenter.h
+++ b/chrome/browser/extensions/api/web_request/upload_data_presenter.h
@@ -23,7 +23,7 @@ class FormDataParser;
namespace net {
class URLRequest;
-class UploadElement;
+class UploadElementReader;
}
namespace extensions {
@@ -43,16 +43,16 @@ void AppendKeyValuePair(const char* key,
FORWARD_DECLARE_TEST(WebRequestUploadDataPresenterTest, RawData);
// UploadDataPresenter is an interface for objects capable to consume a series
-// of UploadElement and represent this data as a base:Value.
+// of UploadElementReader and represent this data as a base:Value.
//
// Workflow for objects implementing this interface:
-// 1. Call object->FeedNext(element) for each element from the request's body.
+// 1. Call object->FeedNext(reader) for each element from the request's body.
// 2. Check if object->Succeeded().
// 3. If that check passed then retrieve object->Result().
class UploadDataPresenter {
public:
virtual ~UploadDataPresenter();
- virtual void FeedNext(const net::UploadElement& element) = 0;
+ virtual void FeedNext(const net::UploadElementReader& reader) = 0;
virtual bool Succeeded() = 0;
virtual scoped_ptr<base::Value> Result() = 0;
@@ -63,16 +63,16 @@ class UploadDataPresenter {
DISALLOW_COPY_AND_ASSIGN(UploadDataPresenter);
};
-// This class passes all the bytes from elements of TYPE_BYTES as a BinaryValue
-// for each such element. Elements of TYPE_FILE are presented as StringValue
-// containing the path for that file.
+// This class passes all the bytes from bytes elements as a BinaryValue for each
+// such element. File elements are presented as StringValue containing the path
+// for that file.
class RawDataPresenter : public UploadDataPresenter {
public:
RawDataPresenter();
virtual ~RawDataPresenter();
// Implementation of UploadDataPresenter.
- virtual void FeedNext(const net::UploadElement& element) OVERRIDE;
+ virtual void FeedNext(const net::UploadElementReader& reader) OVERRIDE;
virtual bool Succeeded() OVERRIDE;
virtual scoped_ptr<base::Value> Result() OVERRIDE;
@@ -88,9 +88,9 @@ class RawDataPresenter : public UploadDataPresenter {
scoped_ptr<base::ListValue> list_;
};
-// This class inspects the contents of elements of TYPE_BYTES. It uses the
+// This class inspects the contents of bytes elements. It uses the
// parser classes inheriting from FormDataParser to parse the concatenated
-// content of such elements. If the parsing is successfull, the parsed form is
+// content of such elements. If the parsing is successful, the parsed form is
// returned as a DictionaryValue. For example, a form consisting of
// <input name="check" type="checkbox" value="A" checked />
// <input name="check" type="checkbox" value="B" checked />
@@ -103,7 +103,7 @@ class ParsedDataPresenter : public UploadDataPresenter {
virtual ~ParsedDataPresenter();
// Implementation of UploadDataPresenter.
- virtual void FeedNext(const net::UploadElement& element) OVERRIDE;
+ virtual void FeedNext(const net::UploadElementReader& reader) OVERRIDE;
virtual bool Succeeded() OVERRIDE;
virtual scoped_ptr<base::Value> Result() OVERRIDE;

Powered by Google App Engine
This is Rietveld 408576698