1 // Copyright (c) 2012 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 // See http://dev.chromium.org/developers/design-documents/multi-process-resource-loading
7 #ifndef CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_H_
8 #define CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_H_
12 #include "base/compiler_specific.h"
13 #include "base/memory/ref_counted.h"
14 #include "content/common/content_export.h"
15 #include "googleurl/src/gurl.h"
16 #include "net/url_request/url_request_status.h"
17 #include "webkit/glue/resource_loader_bridge.h"
21 // Parameters for a resource response header.
22 struct ResourceResponseHead
: webkit_glue::ResourceResponseInfo
{
23 // The response error_code.
25 // TimeTicks::Now() when the browser received the request from the renderer.
26 base::TimeTicks request_start
;
27 // TimeTicks::Now() when the browser sent the response to the renderer.
28 base::TimeTicks response_start
;
31 // Parameters for a synchronous resource response.
32 struct SyncLoadResult
: ResourceResponseHead
{
33 // The final URL after any redirects.
40 // Simple wrapper that refcounts ResourceResponseHead.
41 // Inherited, rather than typedef'd, to allow forward declarations.
42 struct CONTENT_EXPORT ResourceResponse
43 : public base::RefCounted
<ResourceResponse
> {
45 ResourceResponseHead head
;
48 friend class base::RefCounted
<ResourceResponse
>;
49 ~ResourceResponse() {}
52 } // namespace content
54 #endif // CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_H_