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

Side by Side Diff: third_party/WebKit/Source/platform/feature_policy/FeaturePolicy.cpp

Issue 2811793004: Rename EqualIgnoringCase*() to DeprecatedEqualIgnoringCase*() (Closed)
Patch Set: Created 3 years, 8 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "platform/feature_policy/FeaturePolicy.h" 5 #include "platform/feature_policy/FeaturePolicy.h"
6 6
7 #include "platform/RuntimeEnabledFeatures.h" 7 #include "platform/RuntimeEnabledFeatures.h"
8 #include "platform/json/JSONValues.h" 8 #include "platform/json/JSONValues.h"
9 #include "platform/network/HTTPParsers.h" 9 #include "platform/network/HTTPParsers.h"
10 #include "platform/weborigin/SecurityOrigin.h" 10 #include "platform/weborigin/SecurityOrigin.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 messages->push_back("Whitelist is not an array of strings."); 86 messages->push_back("Whitelist is not an array of strings.");
87 continue; 87 continue;
88 } 88 }
89 89
90 WebParsedFeaturePolicyDeclaration whitelist; 90 WebParsedFeaturePolicyDeclaration whitelist;
91 whitelist.feature = feature; 91 whitelist.feature = feature;
92 Vector<WebSecurityOrigin> origins; 92 Vector<WebSecurityOrigin> origins;
93 String target_string; 93 String target_string;
94 for (size_t j = 0; j < targets->size(); ++j) { 94 for (size_t j = 0; j < targets->size(); ++j) {
95 if (targets->at(j)->AsString(&target_string)) { 95 if (targets->at(j)->AsString(&target_string)) {
96 if (EqualIgnoringCase(target_string, "self")) { 96 if (DeprecatedEqualIgnoringCase(target_string, "self")) {
97 if (!origin->IsUnique()) 97 if (!origin->IsUnique())
98 origins.push_back(origin); 98 origins.push_back(origin);
99 } else if (target_string == "*") { 99 } else if (target_string == "*") {
100 whitelist.matches_all_origins = true; 100 whitelist.matches_all_origins = true;
101 } else { 101 } else {
102 WebSecurityOrigin target_origin = 102 WebSecurityOrigin target_origin =
103 WebSecurityOrigin::CreateFromString(target_string); 103 WebSecurityOrigin::CreateFromString(target_string);
104 if (!target_origin.IsNull() && !target_origin.IsUnique()) 104 if (!target_origin.IsNull() && !target_origin.IsUnique())
105 origins.push_back(target_origin); 105 origins.push_back(target_origin);
106 } 106 }
(...skipping 18 matching lines...) Expand all
125 for (const WebFeaturePolicyFeature feature : features) { 125 for (const WebFeaturePolicyFeature feature : features) {
126 WebParsedFeaturePolicyDeclaration whitelist; 126 WebParsedFeaturePolicyDeclaration whitelist;
127 whitelist.feature = feature; 127 whitelist.feature = feature;
128 whitelist.origins = Vector<WebSecurityOrigin>(1UL, {origin}); 128 whitelist.origins = Vector<WebSecurityOrigin>(1UL, {origin});
129 whitelists.push_back(whitelist); 129 whitelists.push_back(whitelist);
130 } 130 }
131 return whitelists; 131 return whitelists;
132 } 132 }
133 133
134 } // namespace blink 134 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698