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