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

Side by Side Diff: third_party/WebKit/Source/platform/network/HTTPParsers.h

Issue 2844353003: Use net::HttpContentTypeDisposition in blink (Closed)
Patch Set: fix Created 3 years, 7 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * Copyright (C) 2011 Apple Inc. All Rights Reserved. 4 * Copyright (C) 2011 Apple Inc. All Rights Reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 29 matching lines...) Expand all
40 #include "platform/wtf/text/StringHash.h" 40 #include "platform/wtf/text/StringHash.h"
41 41
42 #include <stdint.h> 42 #include <stdint.h>
43 #include <memory> 43 #include <memory>
44 44
45 namespace blink { 45 namespace blink {
46 46
47 class Suborigin; 47 class Suborigin;
48 class ResourceResponse; 48 class ResourceResponse;
49 49
50 typedef enum {
51 kContentDispositionNone,
52 kContentDispositionInline,
53 kContentDispositionAttachment,
54 kContentDispositionOther
55 } ContentDispositionType;
56
57 enum ContentTypeOptionsDisposition { 50 enum ContentTypeOptionsDisposition {
58 kContentTypeOptionsNone, 51 kContentTypeOptionsNone,
59 kContentTypeOptionsNosniff 52 kContentTypeOptionsNosniff
60 }; 53 };
61 54
62 // Be sure to update the behavior of 55 // Be sure to update the behavior of
63 // XSSAuditor::combineXSSProtectionHeaderAndCSP whenever you change this enum's 56 // XSSAuditor::combineXSSProtectionHeaderAndCSP whenever you change this enum's
64 // content or ordering. 57 // content or ordering.
65 enum ReflectedXSSDisposition { 58 enum ReflectedXSSDisposition {
66 kReflectedXSSUnset = 0, 59 kReflectedXSSUnset = 0,
(...skipping 14 matching lines...) Expand all
81 double max_age; 74 double max_age;
82 75
83 CacheControlHeader() 76 CacheControlHeader()
84 : parsed(false), 77 : parsed(false),
85 contains_no_cache(false), 78 contains_no_cache(false),
86 contains_no_store(false), 79 contains_no_store(false),
87 contains_must_revalidate(false), 80 contains_must_revalidate(false),
88 max_age(0.0) {} 81 max_age(0.0) {}
89 }; 82 };
90 83
91 PLATFORM_EXPORT ContentDispositionType GetContentDispositionType(const String&); 84 PLATFORM_EXPORT bool IsContentDispositionAttachment(const String&);
92 PLATFORM_EXPORT bool IsValidHTTPHeaderValue(const String&); 85 PLATFORM_EXPORT bool IsValidHTTPHeaderValue(const String&);
93 PLATFORM_EXPORT bool IsValidHTTPFieldContentRFC7230(const String&); 86 PLATFORM_EXPORT bool IsValidHTTPFieldContentRFC7230(const String&);
94 // Checks whether the given string conforms to the |token| ABNF production 87 // Checks whether the given string conforms to the |token| ABNF production
95 // defined in the RFC 7230 or not. 88 // defined in the RFC 7230 or not.
96 // 89 //
97 // The ABNF is for validating octets, but this method takes a String instance 90 // The ABNF is for validating octets, but this method takes a String instance
98 // for convenience which consists of Unicode code points. When this method sees 91 // for convenience which consists of Unicode code points. When this method sees
99 // non-ASCII characters, it just returns false. 92 // non-ASCII characters, it just returns false.
100 PLATFORM_EXPORT bool IsValidHTTPToken(const String&); 93 PLATFORM_EXPORT bool IsValidHTTPToken(const String&);
101 // |matcher| specifies a function to check a whitespace character. if |nullptr| 94 // |matcher| specifies a function to check a whitespace character. if |nullptr|
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 // |*instance_length| = size in bytes of the object requested 158 // |*instance_length| = size in bytes of the object requested
166 // If this method returns false, then all of the outputs will be -1. 159 // If this method returns false, then all of the outputs will be -1.
167 PLATFORM_EXPORT bool ParseContentRangeHeaderFor206(const String& content_range, 160 PLATFORM_EXPORT bool ParseContentRangeHeaderFor206(const String& content_range,
168 int64_t* first_byte_position, 161 int64_t* first_byte_position,
169 int64_t* last_byte_position, 162 int64_t* last_byte_position,
170 int64_t* instance_length); 163 int64_t* instance_length);
171 164
172 } // namespace blink 165 } // namespace blink
173 166
174 #endif 167 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/DocumentLoader.cpp ('k') | third_party/WebKit/Source/platform/network/HTTPParsers.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698