OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 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. | |
4 | |
5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | |
6 | |
7 #ifndef CHROME_COMMON_RESOURCE_RESPONSE_H_ | |
8 #define CHROME_COMMON_RESOURCE_RESPONSE_H_ | |
9 #pragma once | |
10 | |
11 #include <string> | |
12 | |
13 #include "base/ref_counted.h" | |
14 #include "googleurl/src/gurl.h" | |
15 #include "net/url_request/url_request_status.h" | |
16 #include "webkit/glue/resource_loader_bridge.h" | |
17 | |
18 // Parameters for a resource response header. | |
19 struct ResourceResponseHead : webkit_glue::ResourceResponseInfo { | |
20 ResourceResponseHead(); | |
21 ~ResourceResponseHead(); | |
22 | |
23 // The response status. | |
24 net::URLRequestStatus status; | |
25 }; | |
26 | |
27 // Parameters for a synchronous resource response. | |
28 struct SyncLoadResult : ResourceResponseHead { | |
29 SyncLoadResult(); | |
30 ~SyncLoadResult(); | |
31 | |
32 // The final URL after any redirects. | |
33 GURL final_url; | |
34 | |
35 // The response data. | |
36 std::string data; | |
37 }; | |
38 | |
39 // Simple wrapper that refcounts ResourceResponseHead. | |
40 struct ResourceResponse : public base::RefCounted<ResourceResponse> { | |
41 ResourceResponseHead response_head; | |
42 | |
43 ResourceResponse(); | |
44 private: | |
45 friend class base::RefCounted<ResourceResponse>; | |
46 | |
47 virtual ~ResourceResponse(); | |
48 }; | |
49 | |
50 #endif // CHROME_COMMON_RESOURCE_RESPONSE_H_ | |
OLD | NEW |