Index: content/public/common/resource_request_body.h |
diff --git a/content/public/common/resource_request_body.h b/content/public/common/resource_request_body.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0f0d539978a1c2b92b35237f7c26813ca07f95f5 |
--- /dev/null |
+++ b/content/public/common/resource_request_body.h |
@@ -0,0 +1,42 @@ |
+// Copyright 2016 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_PUBLIC_COMMON_RESOURCE_REQUEST_BODY_H_ |
+#define CONTENT_PUBLIC_COMMON_RESOURCE_REQUEST_BODY_H_ |
+ |
+#include <stdint.h> |
+ |
+#include <vector> |
+ |
+#include "base/macros.h" |
+#include "base/memory/ref_counted.h" |
+#include "content/common/content_export.h" |
+ |
+namespace content { |
+ |
+// ResourceRequestBody represents body (i.e. upload data) of a HTTP request. |
+// |
+// This class is intentionally opaque: |
+// - //content embedders cannot inspect payload of ResourceRequestBody (i.e. |
Charlie Reis
2016/06/08 22:43:20
nit: Embedders
(No need to mention //content here.
Łukasz Anforowicz
2016/06/08 23:22:38
Done.
|
+// only the //content layer can decompose ResourceRequestBody into references |
+// to file ranges, byte vectors, blob uris, etc.) |
Charlie Reis
2016/06/08 22:43:20
nit: Add a period after close paren. Same below.
Łukasz Anforowicz
2016/06/08 23:22:38
Done.
|
+// - //content embedders can get instances of ResourceRequestBody only by |
+// receiving an instance created inside //content layer (e.g. passed to the |
+// //content embedder via content::OpenURLParams) |
Łukasz Anforowicz
2016/06/08 16:51:56
This will have to be amended in the next CL to say
Charlie Reis
2016/06/08 22:43:20
Acknowledged.
|
+// - //content embedders typically end up passing ResourceRequestBody back into |
+// the //content layer via content::NavigationController::LoarUrlParams. |
+class CONTENT_EXPORT ResourceRequestBody |
+ : public base::RefCountedThreadSafe<ResourceRequestBody> { |
+ protected: |
+ ResourceRequestBody(); |
+ virtual ~ResourceRequestBody(); |
+ |
+ private: |
+ friend class base::RefCountedThreadSafe<ResourceRequestBody>; |
+ DISALLOW_COPY_AND_ASSIGN(ResourceRequestBody); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_PUBLIC_COMMON_RESOURCE_REQUEST_BODY_H_ |