1 // Copyright 2014 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.
5 #ifndef CONTENT_PUBLIC_BROWSER_STREAM_INFO_H_
6 #define CONTENT_PUBLIC_BROWSER_STREAM_INFO_H_
8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "content/common/content_export.h"
15 class HttpResponseHeaders
;
22 // A convenience structure for passing around both a StreamHandle and associated
23 // metadata. The intent is so, when passing the stream's URL to a child process,
24 // the handle can be retained as long as it is needed while the rest of the
25 // StreamInfo is released.
26 struct CONTENT_EXPORT StreamInfo
{
30 // The handle to the stream itself.
31 scoped_ptr
<StreamHandle
> handle
;
33 // The original URL being redirected to this stream.
36 // The MIME type associated with this stream.
37 std::string mime_type
;
39 // The HTTP response headers associated with this stream.
40 scoped_refptr
<net::HttpResponseHeaders
> response_headers
;
42 DISALLOW_COPY_AND_ASSIGN(StreamInfo
);
45 } // namespace content
47 #endif // CONTENT_PUBLIC_BROWSER_STREAM_INFO_H_