OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 #ifndef WebAssociatedURLLoaderOptions_h | 31 #ifndef WebAssociatedURLLoaderOptions_h |
32 #define WebAssociatedURLLoaderOptions_h | 32 #define WebAssociatedURLLoaderOptions_h |
33 | 33 |
34 #include "public/platform/WebURLRequest.h" | 34 #include "public/platform/WebURLRequest.h" |
35 | 35 |
36 namespace blink { | 36 namespace blink { |
37 | 37 |
38 struct WebAssociatedURLLoaderOptions { | 38 struct WebAssociatedURLLoaderOptions { |
39 enum PreflightPolicy { | 39 enum PreflightPolicy { kConsiderPreflight, kPreventPreflight }; |
40 kConsiderPreflight, | |
41 kPreventPreflight | |
42 }; | |
43 | 40 |
44 WebAssociatedURLLoaderOptions() | 41 WebAssociatedURLLoaderOptions() |
45 : untrusted_http(false), | 42 : untrusted_http(false), |
46 allow_credentials(false), | 43 allow_credentials(false), |
47 expose_all_response_headers(false), | 44 expose_all_response_headers(false), |
48 preflight_policy(kConsiderPreflight), | 45 preflight_policy(kConsiderPreflight), |
49 fetch_request_mode(WebURLRequest::kFetchRequestModeSameOrigin) {} | 46 fetch_request_mode(WebURLRequest::kFetchRequestModeSameOrigin) {} |
50 | 47 |
51 // Whether to validate the method and headers as if this was an | 48 // Whether to validate the method and headers as if this was an |
52 // XMLHttpRequest. | 49 // XMLHttpRequest. |
53 bool untrusted_http; | 50 bool untrusted_http; |
54 // Whether to send HTTP credentials and cookies with the request. | 51 // Whether to send HTTP credentials and cookies with the request. |
55 bool allow_credentials; | 52 bool allow_credentials; |
56 // If policy is to use access control, whether to expose non-whitelisted | 53 // If policy is to use access control, whether to expose non-whitelisted |
57 // response headers to the client. | 54 // response headers to the client. |
58 bool expose_all_response_headers; | 55 bool expose_all_response_headers; |
59 PreflightPolicy preflight_policy; | 56 PreflightPolicy preflight_policy; |
60 WebURLRequest::FetchRequestMode fetch_request_mode; | 57 WebURLRequest::FetchRequestMode fetch_request_mode; |
61 }; | 58 }; |
62 | 59 |
63 } // namespace blink | 60 } // namespace blink |
64 | 61 |
65 #endif | 62 #endif |
OLD | NEW |