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

Unified Diff: content/public/common/resource_request_body.h

Issue 2038813003: Making ResourceRequestBody part of //content's public API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 years, 6 months 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
« no previous file with comments | « content/public/common/page_state.cc ('k') | content/public/common/resource_request_body.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..59f654ed8922cfcab63e6c288873430c50f17cdc
--- /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:
+// - Embedders cannot inspect the payload of ResourceRequestBody. Only the
+// //content layer can decompose ResourceRequestBody into references to file
+// ranges, byte vectors, blob uris, etc.
+// - Embedders can get instances of ResourceRequestBody only by receiving an
+// instance created inside //content layer (e.g. receiving it via
+// content::OpenURLParams).
+// - Embedders typically end up passing ResourceRequestBody back into the
+// //content layer via content::NavigationController::LoadUrlParams.
+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_
« no previous file with comments | « content/public/common/page_state.cc ('k') | content/public/common/resource_request_body.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698