| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 AskClientForCrossOriginCredentials, | 54 AskClientForCrossOriginCredentials, |
| 55 DoNotAskClientForCrossOriginCredentials | 55 DoNotAskClientForCrossOriginCredentials |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 enum SecurityCheckPolicy { | 58 enum SecurityCheckPolicy { |
| 59 SkipSecurityCheck, | 59 SkipSecurityCheck, |
| 60 DoSecurityCheck | 60 DoSecurityCheck |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 struct ResourceLoaderOptions { | 63 struct ResourceLoaderOptions { |
| 64 ResourceLoaderOptions() : sendLoadCallbacks(DoNotSendCallbacks), sniffConten
t(DoNotSniffContent), dataBufferingPolicy(BufferData), allowCredentials(DoNotAll
owStoredCredentials), crossOriginCredentialPolicy(DoNotAskClientForCrossOriginCr
edentials), securityCheck(DoSecurityCheck) { } | 64 ResourceLoaderOptions() |
| 65 ResourceLoaderOptions(SendCallbackPolicy sendLoadCallbacks, ContentSniffingP
olicy sniffContent, DataBufferingPolicy dataBufferingPolicy, StoredCredentials a
llowCredentials, ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy,
SecurityCheckPolicy securityCheck) | 65 : sendLoadCallbacks(DoNotSendCallbacks) |
| 66 , sniffContent(DoNotSniffContent) |
| 67 , dataBufferingPolicy(BufferData) |
| 68 , allowCredentials(DoNotAllowStoredCredentials) |
| 69 , credentialsRequested(ClientDidNotRequestCredentials) |
| 70 , crossOriginCredentialPolicy(DoNotAskClientForCrossOriginCredentials) |
| 71 , securityCheck(DoSecurityCheck) { } |
| 72 |
| 73 ResourceLoaderOptions( |
| 74 SendCallbackPolicy sendLoadCallbacks, |
| 75 ContentSniffingPolicy sniffContent, |
| 76 DataBufferingPolicy dataBufferingPolicy, |
| 77 StoredCredentials allowCredentials, |
| 78 CredentialRequest credentialsRequested, |
| 79 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy, |
| 80 SecurityCheckPolicy securityCheck) |
| 66 : sendLoadCallbacks(sendLoadCallbacks) | 81 : sendLoadCallbacks(sendLoadCallbacks) |
| 67 , sniffContent(sniffContent) | 82 , sniffContent(sniffContent) |
| 68 , dataBufferingPolicy(dataBufferingPolicy) | 83 , dataBufferingPolicy(dataBufferingPolicy) |
| 69 , allowCredentials(allowCredentials) | 84 , allowCredentials(allowCredentials) |
| 85 , credentialsRequested(credentialsRequested) |
| 70 , crossOriginCredentialPolicy(crossOriginCredentialPolicy) | 86 , crossOriginCredentialPolicy(crossOriginCredentialPolicy) |
| 71 , securityCheck(securityCheck) | 87 , securityCheck(securityCheck) |
| 72 { | 88 { |
| 73 } | 89 } |
| 74 SendCallbackPolicy sendLoadCallbacks; | 90 SendCallbackPolicy sendLoadCallbacks; |
| 75 ContentSniffingPolicy sniffContent; | 91 ContentSniffingPolicy sniffContent; |
| 76 DataBufferingPolicy dataBufferingPolicy; | 92 DataBufferingPolicy dataBufferingPolicy; |
| 77 StoredCredentials allowCredentials; // Whether HTTP credentials and cookies
are sent with the request. | 93 StoredCredentials allowCredentials; // Whether HTTP credentials and cookies
are sent with the request. |
| 94 CredentialRequest credentialsRequested; // Whether the client (e.g. XHR) wan
ted credentials in the first place. |
| 78 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy; // Whether we
will ask the client for credentials (if we allow credentials at all). | 95 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy; // Whether we
will ask the client for credentials (if we allow credentials at all). |
| 79 SecurityCheckPolicy securityCheck; | 96 SecurityCheckPolicy securityCheck; |
| 80 }; | 97 }; |
| 81 | 98 |
| 82 } // namespace WebCore | 99 } // namespace WebCore |
| 83 | 100 |
| 84 #endif // ResourceLoaderOptions_h | 101 #endif // ResourceLoaderOptions_h |
| OLD | NEW |