OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_H_ | 7 #ifndef CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_H_ |
8 #define CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_H_ | 8 #define CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
17 #include "net/url_request/url_request_status.h" | 17 #include "net/url_request/url_request_status.h" |
18 #include "webkit/glue/resource_loader_bridge.h" | 18 #include "webkit/glue/resource_loader_bridge.h" |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 | 21 |
22 // Parameters for a resource response header. | 22 // Parameters for a resource response header. |
23 struct ResourceResponseHead : webkit_glue::ResourceResponseInfo { | 23 struct ResourceResponseHead : webkit_glue::ResourceResponseInfo { |
24 // The response status. | 24 // The response error_code. |
25 net::URLRequestStatus status; | 25 int error_code; |
26 // TimeTicks::Now() when the browser received the request from the renderer. | 26 // TimeTicks::Now() when the browser received the request from the renderer. |
27 base::TimeTicks request_start; | 27 base::TimeTicks request_start; |
28 // TimeTicks::Now() when the browser sent the response to the renderer. | 28 // TimeTicks::Now() when the browser sent the response to the renderer. |
29 base::TimeTicks response_start; | 29 base::TimeTicks response_start; |
30 }; | 30 }; |
31 | 31 |
32 // Parameters for a synchronous resource response. | 32 // Parameters for a synchronous resource response. |
33 struct SyncLoadResult : ResourceResponseHead { | 33 struct SyncLoadResult : ResourceResponseHead { |
34 // The final URL after any redirects. | 34 // The final URL after any redirects. |
35 GURL final_url; | 35 GURL final_url; |
(...skipping 10 matching lines...) Expand all Loading... |
46 ResourceResponseHead head; | 46 ResourceResponseHead head; |
47 | 47 |
48 private: | 48 private: |
49 friend class base::RefCounted<ResourceResponse>; | 49 friend class base::RefCounted<ResourceResponse>; |
50 ~ResourceResponse() {} | 50 ~ResourceResponse() {} |
51 }; | 51 }; |
52 | 52 |
53 } // namespace content | 53 } // namespace content |
54 | 54 |
55 #endif // CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_H_ | 55 #endif // CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_H_ |
OLD | NEW |