OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_PUBLIC_COMMON_RESOURCE_REQUEST_BODY_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_RESOURCE_REQUEST_BODY_H_ |
| 7 |
| 8 #include <stdint.h> |
| 9 |
| 10 #include <vector> |
| 11 |
| 12 #include "base/macros.h" |
| 13 #include "base/memory/ref_counted.h" |
| 14 #include "content/common/content_export.h" |
| 15 |
| 16 namespace content { |
| 17 |
| 18 // ResourceRequestBody represents body (i.e. upload data) of a HTTP request. |
| 19 // |
| 20 // This class is intentionally opaque: |
| 21 // - Embedders cannot inspect the payload of ResourceRequestBody. Only the |
| 22 // //content layer can decompose ResourceRequestBody into references to file |
| 23 // ranges, byte vectors, blob uris, etc. |
| 24 // - Embedders can get instances of ResourceRequestBody only by receiving an |
| 25 // instance created inside //content layer (e.g. receiving it via |
| 26 // content::OpenURLParams). |
| 27 // - Embedders typically end up passing ResourceRequestBody back into the |
| 28 // //content layer via content::NavigationController::LoadUrlParams. |
| 29 class CONTENT_EXPORT ResourceRequestBody |
| 30 : public base::RefCountedThreadSafe<ResourceRequestBody> { |
| 31 protected: |
| 32 ResourceRequestBody(); |
| 33 virtual ~ResourceRequestBody(); |
| 34 |
| 35 private: |
| 36 friend class base::RefCountedThreadSafe<ResourceRequestBody>; |
| 37 DISALLOW_COPY_AND_ASSIGN(ResourceRequestBody); |
| 38 }; |
| 39 |
| 40 } // namespace content |
| 41 |
| 42 #endif // CONTENT_PUBLIC_COMMON_RESOURCE_REQUEST_BODY_H_ |
OLD | NEW |