Chromium Code Reviews| Index: content/browser/renderer_host/cross_site_request_transfer.h |
| =================================================================== |
| --- content/browser/renderer_host/cross_site_request_transfer.h (revision 0) |
| +++ content/browser/renderer_host/cross_site_request_transfer.h (revision 0) |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2014 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_RENDERER_HOST_CROSS_SITE_REQUEST_TRANSFER_H_ |
| +#define CONTENT_BROWSER_RENDERER_HOST_CROSS_SITE_REQUEST_TRANSFER_H_ |
|
Charlie Reis
2014/02/13 22:12:19
I think this would belong in frame_host rather tha
mmenke
2014/02/14 16:30:02
I tried to have it in frame_host. Unfortunately,
mmenke
2014/02/14 17:10:20
"Pass it around" == Pass the request ID around wit
Charlie Reis
2014/02/15 01:25:44
Oh, RVH needs it for now. Ok, you can leave it he
|
| + |
| +#include "base/basictypes.h" |
| +#include "content/common/content_export.h" |
| + |
| +namespace content { |
| + |
| +class CrossSiteResourceHandler; |
| + |
| +// A UI thread object that owns a request being transferred. Deleting the |
| +// object without releasing the request will delete the underlying URLRequest. |
| +// This is needed to clean up the URLRequest when a cross site navigation is |
| +// cancelled. |
| +class CONTENT_EXPORT CrossSiteRequestTransfer { |
|
Charlie Reis
2014/02/13 22:12:19
CrossSiteRequest or CrossSiteTransferringRequest,
mmenke
2014/02/14 16:30:02
I considered "CrossSiteRequest", but I didn't like
|
| + public: |
| + explicit CrossSiteRequestTransfer( |
| + CrossSiteResourceHandler* cross_site_resource_handler); |
| + ~CrossSiteRequestTransfer(); |
| + |
| + // Relinquishes ownership of the request, so another process can take |
| + // control of it. |
| + void ReleaseRequest(); |
| + |
| + private: |
| + // No need for a weak pointer here - nothing should have ownership of the |
| + // cross site request until after |this| is deleted, or ReleaseRequest is |
| + // called. |
| + CrossSiteResourceHandler* cross_site_resource_handler_; |
|
Charlie Reis
2014/02/13 22:12:19
I'm not yet convinced this is safe, because CrossS
mmenke
2014/02/14 16:30:02
If it can be, then we don't actually own it, and t
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(CrossSiteRequestTransfer); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_RENDERER_HOST_CROSS_SITE_REQUEST_TRANSFER_H_ |
| Property changes on: content\browser\renderer_host\cross_site_request_transfer.h |
| ___________________________________________________________________ |
| Added: svn:eol-style |
| + LF |