| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 #ifndef CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_INFO_H_ | 5 #ifndef CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_INFO_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_INFO_H_ | 6 #define CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_INFO_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
| 14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
| 15 #include "content/public/common/resource_devtools_info.h" | 15 #include "content/public/common/resource_devtools_info.h" |
| 16 #include "net/base/host_port_pair.h" | 16 #include "net/base/host_port_pair.h" |
| 17 #include "net/base/load_timing_info.h" | 17 #include "net/base/load_timing_info.h" |
| 18 #include "net/http/http_response_headers.h" | 18 #include "net/http/http_response_headers.h" |
| 19 #include "net/http/http_response_info.h" | 19 #include "net/http/http_response_info.h" |
| 20 #include "third_party/WebKit/public/platform/WebServiceWorkerResponseType.h" |
| 20 #include "url/gurl.h" | 21 #include "url/gurl.h" |
| 21 | 22 |
| 22 namespace content { | 23 namespace content { |
| 23 | 24 |
| 24 struct ResourceResponseInfo { | 25 struct ResourceResponseInfo { |
| 25 CONTENT_EXPORT ResourceResponseInfo(); | 26 CONTENT_EXPORT ResourceResponseInfo(); |
| 26 CONTENT_EXPORT ~ResourceResponseInfo(); | 27 CONTENT_EXPORT ~ResourceResponseInfo(); |
| 27 | 28 |
| 28 // The time at which the request was made that resulted in this response. | 29 // The time at which the request was made that resulted in this response. |
| 29 // For cached responses, this time could be "far" in the past. | 30 // For cached responses, this time could be "far" in the past. |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 // True when the request whoes mode is |CORS| or |CORS-with-forced-preflight| | 106 // True when the request whoes mode is |CORS| or |CORS-with-forced-preflight| |
| 106 // is sent to a ServiceWorker but FetchEvent.respondWith is not called. So the | 107 // is sent to a ServiceWorker but FetchEvent.respondWith is not called. So the |
| 107 // renderer have to resend the request with skip service worker flag | 108 // renderer have to resend the request with skip service worker flag |
| 108 // considering the CORS preflight logic. | 109 // considering the CORS preflight logic. |
| 109 bool was_fallback_required_by_service_worker; | 110 bool was_fallback_required_by_service_worker; |
| 110 | 111 |
| 111 // The original URL of the response which was fetched by the ServiceWorker. | 112 // The original URL of the response which was fetched by the ServiceWorker. |
| 112 // This may be empty if the response was created inside the ServiceWorker. | 113 // This may be empty if the response was created inside the ServiceWorker. |
| 113 GURL original_url_via_service_worker; | 114 GURL original_url_via_service_worker; |
| 114 | 115 |
| 116 // The type of the response which was fetched by the ServiceWorker. |
| 117 blink::WebServiceWorkerResponseType response_type_via_service_worker; |
| 118 |
| 115 // ServiceWorker Timing Information. These will be set if the response is | 119 // ServiceWorker Timing Information. These will be set if the response is |
| 116 // provided by the ServiceWorker, or kept empty. | 120 // provided by the ServiceWorker, or kept empty. |
| 117 base::TimeTicks service_worker_fetch_start; | 121 base::TimeTicks service_worker_fetch_start; |
| 118 base::TimeTicks service_worker_fetch_ready; | 122 base::TimeTicks service_worker_fetch_ready; |
| 119 base::TimeTicks service_worker_fetch_end; | 123 base::TimeTicks service_worker_fetch_end; |
| 120 }; | 124 }; |
| 121 | 125 |
| 122 } // namespace content | 126 } // namespace content |
| 123 | 127 |
| 124 #endif // CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_INFO_H_ | 128 #endif // CONTENT_PUBLIC_COMMON_RESOURCE_RESPONSE_INFO_H_ |
| OLD | NEW |