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

Side by Side Diff: third_party/WebKit/Source/core/frame/csp/MediaListDirective.cpp

Issue 2891843004: Replace remaining ASSERT with DCHECK|DCHECK_FOO in core/frame (Closed)
Patch Set: Replace remaining ASSERT with DCHECK|DCHECK_FOO in core/frame 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
« no previous file with comments | « third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/frame/csp/MediaListDirective.h" 5 #include "core/frame/csp/MediaListDirective.h"
6 6
7 #include "core/frame/csp/ContentSecurityPolicy.h" 7 #include "core/frame/csp/ContentSecurityPolicy.h"
8 #include "platform/network/ContentSecurityPolicyParsers.h" 8 #include "platform/network/ContentSecurityPolicyParsers.h"
9 #include "platform/wtf/HashSet.h" 9 #include "platform/wtf/HashSet.h"
10 #include "platform/wtf/text/ParsingUtilities.h" 10 #include "platform/wtf/text/ParsingUtilities.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 // mime1/mime1 mime2/mime2 OR mime1/mime1 OR mime1/mime1/error 73 // mime1/mime1 mime2/mime2 OR mime1/mime1 OR mime1/mime1/error
74 // ^ ^ ^ 74 // ^ ^ ^
75 if (position < end && IsNotASCIISpace(*position)) { 75 if (position < end && IsNotASCIISpace(*position)) {
76 skipWhile<UChar, IsNotASCIISpace>(position, end); 76 skipWhile<UChar, IsNotASCIISpace>(position, end);
77 Policy()->ReportInvalidPluginTypes(String(begin, position - begin)); 77 Policy()->ReportInvalidPluginTypes(String(begin, position - begin));
78 continue; 78 continue;
79 } 79 }
80 plugin_types_.insert(String(begin, position - begin)); 80 plugin_types_.insert(String(begin, position - begin));
81 81
82 ASSERT(position == end || IsASCIISpace(*position)); 82 DCHECK(position == end || IsASCIISpace(*position));
83 } 83 }
84 } 84 }
85 85
86 bool MediaListDirective::Subsumes( 86 bool MediaListDirective::Subsumes(
87 const HeapVector<Member<MediaListDirective>>& other) const { 87 const HeapVector<Member<MediaListDirective>>& other) const {
88 if (!other.size()) 88 if (!other.size())
89 return false; 89 return false;
90 90
91 // Find the effective set of plugins allowed by `other`. 91 // Find the effective set of plugins allowed by `other`.
92 HashSet<String> normalized_b = other[0]->plugin_types_; 92 HashSet<String> normalized_b = other[0]->plugin_types_;
(...skipping 18 matching lines...) Expand all
111 HashSet<String> normalized; 111 HashSet<String> normalized;
112 for (const auto& type : plugin_types_) { 112 for (const auto& type : plugin_types_) {
113 if (other.Contains(type)) 113 if (other.Contains(type))
114 normalized.insert(type); 114 normalized.insert(type);
115 } 115 }
116 116
117 return normalized; 117 return normalized;
118 } 118 }
119 119
120 } // namespace blink 120 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698