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

Unified Diff: Source/core/fetch/ResourceLoaderOptions.h

Issue 531553002: Remove dead content sniffing code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/fetch/ResourceLoader.h ('k') | Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ResourceLoaderOptions.h
diff --git a/Source/core/fetch/ResourceLoaderOptions.h b/Source/core/fetch/ResourceLoaderOptions.h
index d9acf984bcb3d011cb17213353a046823c65b765..ac30d74801404b9d8ef0cc58c165ddc2842ec666 100644
--- a/Source/core/fetch/ResourceLoaderOptions.h
+++ b/Source/core/fetch/ResourceLoaderOptions.h
@@ -37,11 +37,6 @@
namespace blink {
-enum ContentSniffingPolicy {
- SniffContent,
- DoNotSniffContent
-};
-
enum DataBufferingPolicy {
BufferData,
DoNotBufferData
@@ -92,8 +87,7 @@ enum CORSEnabled {
struct ResourceLoaderOptions {
ResourceLoaderOptions()
- : sniffContent(DoNotSniffContent)
- , dataBufferingPolicy(BufferData)
+ : dataBufferingPolicy(BufferData)
, allowCredentials(DoNotAllowStoredCredentials)
, credentialsRequested(ClientDidNotRequestCredentials)
, contentSecurityPolicyOption(CheckContentSecurityPolicy)
@@ -105,14 +99,12 @@ struct ResourceLoaderOptions {
}
ResourceLoaderOptions(
- ContentSniffingPolicy sniffContent,
DataBufferingPolicy dataBufferingPolicy,
StoredCredentials allowCredentials,
CredentialRequest credentialsRequested,
ContentSecurityPolicyCheck contentSecurityPolicyOption,
RequestInitiatorContext requestInitiatorContext)
- : sniffContent(sniffContent)
- , dataBufferingPolicy(dataBufferingPolicy)
+ : dataBufferingPolicy(dataBufferingPolicy)
, allowCredentials(allowCredentials)
, credentialsRequested(credentialsRequested)
, contentSecurityPolicyOption(contentSecurityPolicyOption)
@@ -128,7 +120,6 @@ struct ResourceLoaderOptions {
// The safe (but possibly slow) answer is always false.
bool canReuseRequest(const ResourceLoaderOptions& other) const
{
- // sniffContent is dead code.
// dataBufferingPolicy differences are believed to be safe for re-use.
// FIXME: check allowCredentials.
// FIXME: check credentialsRequested.
@@ -143,7 +134,6 @@ struct ResourceLoaderOptions {
// When adding members, CrossThreadResourceLoaderOptionsData should be
// updated.
- ContentSniffingPolicy sniffContent; // FIXME: Dead code, please remove.
DataBufferingPolicy dataBufferingPolicy;
StoredCredentials allowCredentials; // Whether HTTP credentials and cookies are sent with the request.
CredentialRequest credentialsRequested; // Whether the client (e.g. XHR) wanted credentials in the first place.
@@ -159,8 +149,7 @@ struct ResourceLoaderOptions {
// Encode AtomicString (in FetchInitiatorInfo) as String to cross threads.
struct CrossThreadResourceLoaderOptionsData {
explicit CrossThreadResourceLoaderOptionsData(const ResourceLoaderOptions& options)
- : sniffContent(options.sniffContent)
- , dataBufferingPolicy(options.dataBufferingPolicy)
+ : dataBufferingPolicy(options.dataBufferingPolicy)
, allowCredentials(options.allowCredentials)
, credentialsRequested(options.credentialsRequested)
, contentSecurityPolicyOption(options.contentSecurityPolicyOption)
@@ -174,7 +163,6 @@ struct CrossThreadResourceLoaderOptionsData {
operator ResourceLoaderOptions() const
{
ResourceLoaderOptions options;
- options.sniffContent = sniffContent;
options.dataBufferingPolicy = dataBufferingPolicy;
options.allowCredentials = allowCredentials;
options.credentialsRequested = credentialsRequested;
@@ -188,7 +176,6 @@ struct CrossThreadResourceLoaderOptionsData {
return options;
}
- ContentSniffingPolicy sniffContent;
DataBufferingPolicy dataBufferingPolicy;
StoredCredentials allowCredentials;
CredentialRequest credentialsRequested;
« no previous file with comments | « Source/core/fetch/ResourceLoader.h ('k') | Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698