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

Side by Side Diff: third_party/WebKit/Source/platform/weborigin/SchemeRegistry.h

Issue 2462893002: Assume SchemeRegistry only operates on lowercase schemes (Closed)
Patch Set: remove assumptions from tests Created 4 years, 1 month 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 | « no previous file | third_party/WebKit/Source/platform/weborigin/SchemeRegistry.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) 2010 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2010 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 18 matching lines...) Expand all
29 29
30 #include "platform/PlatformExport.h" 30 #include "platform/PlatformExport.h"
31 #include "wtf/Allocator.h" 31 #include "wtf/Allocator.h"
32 #include "wtf/HashMap.h" 32 #include "wtf/HashMap.h"
33 #include "wtf/HashSet.h" 33 #include "wtf/HashSet.h"
34 #include "wtf/text/StringHash.h" 34 #include "wtf/text/StringHash.h"
35 #include "wtf/text/WTFString.h" 35 #include "wtf/text/WTFString.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 using URLSchemesSet = HashSet<String, CaseFoldingHash>; 39 using URLSchemesSet = HashSet<String>;
40 40
41 template <typename T> 41 template <typename T>
42 using URLSchemesMap = HashMap<String, T, CaseFoldingHash>; 42 using URLSchemesMap = HashMap<String, T>;
43 43
44 class PLATFORM_EXPORT SchemeRegistry { 44 class PLATFORM_EXPORT SchemeRegistry {
45 STATIC_ONLY(SchemeRegistry); 45 STATIC_ONLY(SchemeRegistry);
46 46
47 public: 47 public:
48 static void initialize(); 48 static void initialize();
49 49
50 static void registerURLSchemeAsLocal(const String&); 50 static void registerURLSchemeAsLocal(const String&);
51 static bool shouldTreatURLSchemeAsLocal(const String&); 51 static bool shouldTreatURLSchemeAsLocal(const String&);
52 52
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 const String& scheme); 142 const String& scheme);
143 static bool schemeShouldBypassSecureContextCheck(const String& scheme); 143 static bool schemeShouldBypassSecureContextCheck(const String& scheme);
144 144
145 private: 145 private:
146 static const URLSchemesSet& localSchemes(); 146 static const URLSchemesSet& localSchemes();
147 }; 147 };
148 148
149 } // namespace blink 149 } // namespace blink
150 150
151 #endif // SchemeRegistry_h 151 #endif // SchemeRegistry_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698