Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: Source/core/fetch/ResourceLoaderOptions.h

Issue 23437013: Consider "mixed content XHR" as mixed script instead of mixed display. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add missing test expectation file. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 // APIs like XMLHttpRequest and EventSource let the user decide 84 // APIs like XMLHttpRequest and EventSource let the user decide
85 // whether to send credentials, but they're always sent for 85 // whether to send credentials, but they're always sent for
86 // same-origin requests. Additional information is needed to handle 86 // same-origin requests. Additional information is needed to handle
87 // cross-origin redirects correctly. 87 // cross-origin redirects correctly.
88 enum CredentialRequest { 88 enum CredentialRequest {
89 ClientRequestedCredentials, 89 ClientRequestedCredentials,
90 ClientDidNotRequestCredentials 90 ClientDidNotRequestCredentials
91 }; 91 };
92 92
93 enum MixedRawContentBlockingOption {
94 TreatAsPassiveContent,
95 TreatAsActiveContent
abarth-chromium 2013/08/30 06:37:08 I'd recommend making this a three-state enum. The
96 };
97
93 struct ResourceLoaderOptions { 98 struct ResourceLoaderOptions {
94 ResourceLoaderOptions() 99 ResourceLoaderOptions()
95 : sendLoadCallbacks(DoNotSendCallbacks) 100 : sendLoadCallbacks(DoNotSendCallbacks)
96 , sniffContent(DoNotSniffContent) 101 , sniffContent(DoNotSniffContent)
97 , dataBufferingPolicy(BufferData) 102 , dataBufferingPolicy(BufferData)
98 , allowCredentials(DoNotAllowStoredCredentials) 103 , allowCredentials(DoNotAllowStoredCredentials)
99 , credentialsRequested(ClientDidNotRequestCredentials) 104 , credentialsRequested(ClientDidNotRequestCredentials)
100 , crossOriginCredentialPolicy(DoNotAskClientForCrossOriginCredentials) 105 , crossOriginCredentialPolicy(DoNotAskClientForCrossOriginCredentials)
101 , securityCheck(DoSecurityCheck) 106 , securityCheck(DoSecurityCheck)
102 , contentSecurityPolicyOption(CheckContentSecurityPolicy) 107 , contentSecurityPolicyOption(CheckContentSecurityPolicy)
103 , requestOriginPolicy(UseDefaultOriginRestrictionsForType) 108 , requestOriginPolicy(UseDefaultOriginRestrictionsForType)
104 , requestInitiatorContext(DocumentContext) 109 , requestInitiatorContext(DocumentContext)
110 , mixedRawContentBlockingOption(TreatAsPassiveContent)
105 { 111 {
106 } 112 }
107 113
108 ResourceLoaderOptions( 114 ResourceLoaderOptions(
109 SendCallbackPolicy sendLoadCallbacks, 115 SendCallbackPolicy sendLoadCallbacks,
110 ContentSniffingPolicy sniffContent, 116 ContentSniffingPolicy sniffContent,
111 DataBufferingPolicy dataBufferingPolicy, 117 DataBufferingPolicy dataBufferingPolicy,
112 StoredCredentials allowCredentials, 118 StoredCredentials allowCredentials,
113 CredentialRequest credentialsRequested, 119 CredentialRequest credentialsRequested,
114 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy, 120 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy,
115 SecurityCheckPolicy securityCheck, 121 SecurityCheckPolicy securityCheck,
116 ContentSecurityPolicyCheck contentSecurityPolicyOption, 122 ContentSecurityPolicyCheck contentSecurityPolicyOption,
117 RequestOriginPolicy requestOriginPolicy, 123 RequestOriginPolicy requestOriginPolicy,
118 RequestInitiatorContext requestInitiatorContext) 124 RequestInitiatorContext requestInitiatorContext)
119 : sendLoadCallbacks(sendLoadCallbacks) 125 : sendLoadCallbacks(sendLoadCallbacks)
120 , sniffContent(sniffContent) 126 , sniffContent(sniffContent)
121 , dataBufferingPolicy(dataBufferingPolicy) 127 , dataBufferingPolicy(dataBufferingPolicy)
122 , allowCredentials(allowCredentials) 128 , allowCredentials(allowCredentials)
123 , credentialsRequested(credentialsRequested) 129 , credentialsRequested(credentialsRequested)
124 , crossOriginCredentialPolicy(crossOriginCredentialPolicy) 130 , crossOriginCredentialPolicy(crossOriginCredentialPolicy)
125 , securityCheck(securityCheck) 131 , securityCheck(securityCheck)
126 , contentSecurityPolicyOption(contentSecurityPolicyOption) 132 , contentSecurityPolicyOption(contentSecurityPolicyOption)
127 , requestOriginPolicy(requestOriginPolicy) 133 , requestOriginPolicy(requestOriginPolicy)
128 , requestInitiatorContext(requestInitiatorContext) 134 , requestInitiatorContext(requestInitiatorContext)
135 , mixedRawContentBlockingOption(TreatAsPassiveContent)
129 { 136 {
130 } 137 }
131 SendCallbackPolicy sendLoadCallbacks; 138 SendCallbackPolicy sendLoadCallbacks;
132 ContentSniffingPolicy sniffContent; 139 ContentSniffingPolicy sniffContent;
133 DataBufferingPolicy dataBufferingPolicy; 140 DataBufferingPolicy dataBufferingPolicy;
134 StoredCredentials allowCredentials; // Whether HTTP credentials and cookies are sent with the request. 141 StoredCredentials allowCredentials; // Whether HTTP credentials and cookies are sent with the request.
135 CredentialRequest credentialsRequested; // Whether the client (e.g. XHR) wan ted credentials in the first place. 142 CredentialRequest credentialsRequested; // Whether the client (e.g. XHR) wan ted credentials in the first place.
136 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy; // Whether we will ask the client for credentials (if we allow credentials at all). 143 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy; // Whether we will ask the client for credentials (if we allow credentials at all).
137 SecurityCheckPolicy securityCheck; 144 SecurityCheckPolicy securityCheck;
138 ContentSecurityPolicyCheck contentSecurityPolicyOption; 145 ContentSecurityPolicyCheck contentSecurityPolicyOption;
139 FetchInitiatorInfo initiatorInfo; 146 FetchInitiatorInfo initiatorInfo;
140 RequestOriginPolicy requestOriginPolicy; 147 RequestOriginPolicy requestOriginPolicy;
141 RequestInitiatorContext requestInitiatorContext; 148 RequestInitiatorContext requestInitiatorContext;
149 MixedRawContentBlockingOption mixedRawContentBlockingOption;
142 }; 150 };
143 151
144 } // namespace WebCore 152 } // namespace WebCore
145 153
146 #endif // ResourceLoaderOptions_h 154 #endif // ResourceLoaderOptions_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698