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

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: Tidy. 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
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | Source/core/loader/DocumentThreadableLoader.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 MixedContentBlockingTreatment {
94 TreatAsDefaultForType,
95 TreatAsPassiveContent,
96 TreatAsActiveContent,
97 TreatAsAlwaysAllowedContent
98 };
99
93 struct ResourceLoaderOptions { 100 struct ResourceLoaderOptions {
94 ResourceLoaderOptions() 101 ResourceLoaderOptions()
95 : sendLoadCallbacks(DoNotSendCallbacks) 102 : sendLoadCallbacks(DoNotSendCallbacks)
96 , sniffContent(DoNotSniffContent) 103 , sniffContent(DoNotSniffContent)
97 , dataBufferingPolicy(BufferData) 104 , dataBufferingPolicy(BufferData)
98 , allowCredentials(DoNotAllowStoredCredentials) 105 , allowCredentials(DoNotAllowStoredCredentials)
99 , credentialsRequested(ClientDidNotRequestCredentials) 106 , credentialsRequested(ClientDidNotRequestCredentials)
100 , crossOriginCredentialPolicy(DoNotAskClientForCrossOriginCredentials) 107 , crossOriginCredentialPolicy(DoNotAskClientForCrossOriginCredentials)
101 , securityCheck(DoSecurityCheck) 108 , securityCheck(DoSecurityCheck)
102 , contentSecurityPolicyOption(CheckContentSecurityPolicy) 109 , contentSecurityPolicyOption(CheckContentSecurityPolicy)
103 , requestOriginPolicy(UseDefaultOriginRestrictionsForType) 110 , requestOriginPolicy(UseDefaultOriginRestrictionsForType)
104 , requestInitiatorContext(DocumentContext) 111 , requestInitiatorContext(DocumentContext)
112 , mixedContentBlockingTreatment(TreatAsDefaultForType)
105 { 113 {
106 } 114 }
107 115
108 ResourceLoaderOptions( 116 ResourceLoaderOptions(
109 SendCallbackPolicy sendLoadCallbacks, 117 SendCallbackPolicy sendLoadCallbacks,
110 ContentSniffingPolicy sniffContent, 118 ContentSniffingPolicy sniffContent,
111 DataBufferingPolicy dataBufferingPolicy, 119 DataBufferingPolicy dataBufferingPolicy,
112 StoredCredentials allowCredentials, 120 StoredCredentials allowCredentials,
113 CredentialRequest credentialsRequested, 121 CredentialRequest credentialsRequested,
114 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy, 122 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy,
115 SecurityCheckPolicy securityCheck, 123 SecurityCheckPolicy securityCheck,
116 ContentSecurityPolicyCheck contentSecurityPolicyOption, 124 ContentSecurityPolicyCheck contentSecurityPolicyOption,
117 RequestOriginPolicy requestOriginPolicy, 125 RequestOriginPolicy requestOriginPolicy,
118 RequestInitiatorContext requestInitiatorContext) 126 RequestInitiatorContext requestInitiatorContext)
119 : sendLoadCallbacks(sendLoadCallbacks) 127 : sendLoadCallbacks(sendLoadCallbacks)
120 , sniffContent(sniffContent) 128 , sniffContent(sniffContent)
121 , dataBufferingPolicy(dataBufferingPolicy) 129 , dataBufferingPolicy(dataBufferingPolicy)
122 , allowCredentials(allowCredentials) 130 , allowCredentials(allowCredentials)
123 , credentialsRequested(credentialsRequested) 131 , credentialsRequested(credentialsRequested)
124 , crossOriginCredentialPolicy(crossOriginCredentialPolicy) 132 , crossOriginCredentialPolicy(crossOriginCredentialPolicy)
125 , securityCheck(securityCheck) 133 , securityCheck(securityCheck)
126 , contentSecurityPolicyOption(contentSecurityPolicyOption) 134 , contentSecurityPolicyOption(contentSecurityPolicyOption)
127 , requestOriginPolicy(requestOriginPolicy) 135 , requestOriginPolicy(requestOriginPolicy)
128 , requestInitiatorContext(requestInitiatorContext) 136 , requestInitiatorContext(requestInitiatorContext)
137 , mixedContentBlockingTreatment(TreatAsDefaultForType)
129 { 138 {
130 } 139 }
140
131 SendCallbackPolicy sendLoadCallbacks; 141 SendCallbackPolicy sendLoadCallbacks;
132 ContentSniffingPolicy sniffContent; 142 ContentSniffingPolicy sniffContent;
133 DataBufferingPolicy dataBufferingPolicy; 143 DataBufferingPolicy dataBufferingPolicy;
134 StoredCredentials allowCredentials; // Whether HTTP credentials and cookies are sent with the request. 144 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. 145 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). 146 ClientCrossOriginCredentialPolicy crossOriginCredentialPolicy; // Whether we will ask the client for credentials (if we allow credentials at all).
137 SecurityCheckPolicy securityCheck; 147 SecurityCheckPolicy securityCheck;
138 ContentSecurityPolicyCheck contentSecurityPolicyOption; 148 ContentSecurityPolicyCheck contentSecurityPolicyOption;
139 FetchInitiatorInfo initiatorInfo; 149 FetchInitiatorInfo initiatorInfo;
140 RequestOriginPolicy requestOriginPolicy; 150 RequestOriginPolicy requestOriginPolicy;
141 RequestInitiatorContext requestInitiatorContext; 151 RequestInitiatorContext requestInitiatorContext;
152 MixedContentBlockingTreatment mixedContentBlockingTreatment;
142 }; 153 };
143 154
144 } // namespace WebCore 155 } // namespace WebCore
145 156
146 #endif // ResourceLoaderOptions_h 157 #endif // ResourceLoaderOptions_h
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceFetcher.cpp ('k') | Source/core/loader/DocumentThreadableLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698