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..7b4a0e3bda5184059781e81e9bf49605a877fa72 |
| --- /dev/null |
| +++ b/content/browser/resource_request_body_browser_utils.h |
| @@ -0,0 +1,24 @@ |
| +// 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_ |
| + |
| +#include "base/memory/ref_counted.h" |
| + |
| +namespace content { |
| + |
| +class SiteInstance; |
| +class ResourceRequestBodyImpl; |
| + |
| +// Checks if |site_instance| can read all elements of |body|. |
|
alexmos
2017/05/25 23:44:06
nit: Maybe elaborate a little bit? I.e., validate
Łukasz Anforowicz
2017/05/26 00:05:14
Done.
|
| +// TODO(lukasza): Remove code duplication - the function below should be reused |
| +// by RenderFrameHostImpl::OnBeginNavigation and |
| +// ResourceDispatcherHostImpl::ShouldServiceRequest. |
| +bool CanReadRequestBody(SiteInstance* site_instance, |
| + const scoped_refptr<ResourceRequestBodyImpl>& body); |
|
Łukasz Anforowicz
2017/05/25 19:56:01
Does this look okay?
I had some comments about th
alexmos
2017/05/25 23:44:06
Hmm, this might be ok. A static-only class might
Łukasz Anforowicz
2017/05/26 00:05:14
Ok - see https://codereview.chromium.org/290843300
|
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_RESOURCE_REQUEST_BODY_BROWSER_UTILS_H_ |