Chromium Code Reviews| Index: content/browser/resource_request_body_browser_utils.h |
| diff --git a/content/browser/resource_request_body_browser_utils.h b/content/browser/resource_request_body_browser_utils.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..771e9c91d025fe9b29254901510940b00300a19b |
| --- /dev/null |
| +++ b/content/browser/resource_request_body_browser_utils.h |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2017 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_BROWSER_RESOURCE_REQUEST_BODY_BROWSER_UTILS_H_ |
| +#define CONTENT_BROWSER_RESOURCE_REQUEST_BODY_BROWSER_UTILS_H_ |
|
Łukasz Anforowicz
2017/05/25 16:11:37
I don't see another good place for the new helper
|
| + |
| +#include "base/memory/ref_counted.h" |
| + |
| +namespace storage { |
| +class FileSystemContext; |
| +} // namespace storage |
| + |
| +namespace content { |
| + |
| +class SiteInstance; |
| +class ResourceRequestBodyImpl; |
| + |
| +// Checks if |child_id| and |file_system_context| can read all elements of |
| +// |body|. |
| +bool CanReadRequestBody(int child_id, |
| + const storage::FileSystemContext* file_system_context, |
| + const scoped_refptr<ResourceRequestBodyImpl>& body); |
|
Łukasz Anforowicz
2017/05/25 16:11:37
This overload is used from ResourceDispatcherHostI
mmenke
2017/05/25 17:20:25
Overloads are generally discouraged. Also it migh
|
| + |
| +// Checks if |site_instance| can read all elements of |body|. |
| +bool CanReadRequestBody(SiteInstance* site_instance, |
| + const scoped_refptr<ResourceRequestBodyImpl>& body); |
|
Łukasz Anforowicz
2017/05/25 16:11:37
This overload is used from RenderFrameHostImpl::On
|
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_RESOURCE_REQUEST_BODY_BROWSER_UTILS_H_ |