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

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

Issue 2680933005: Make static KURLs thread safe
Patch Set: :/ Created 3 years, 10 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) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 24 matching lines...) Expand all
35 #include "wtf/HashTableDeletedValueType.h" 35 #include "wtf/HashTableDeletedValueType.h"
36 #include "wtf/text/WTFString.h" 36 #include "wtf/text/WTFString.h"
37 #include <memory> 37 #include <memory>
38 38
39 namespace WTF { 39 namespace WTF {
40 class TextEncoding; 40 class TextEncoding;
41 } 41 }
42 42
43 namespace blink { 43 namespace blink {
44 44
45 PLATFORM_EXPORT extern const char kAboutBlankUrl[];
46
45 struct KURLHash; 47 struct KURLHash;
46 48
47 enum ParsedURLStringTag { ParsedURLString }; 49 enum ParsedURLStringTag { ParsedURLString };
48 50
49 class PLATFORM_EXPORT KURL { 51 class PLATFORM_EXPORT KURL {
50 USING_FAST_MALLOC(KURL); 52 USING_FAST_MALLOC(KURL);
51 53
52 public: 54 public:
53 // This must be called during initialization (before we create 55 // This must be called during initialization (before we create
54 // other threads). 56 // other threads).
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 PLATFORM_EXPORT bool operator==(const KURL&, const KURL&); 227 PLATFORM_EXPORT bool operator==(const KURL&, const KURL&);
226 PLATFORM_EXPORT bool operator==(const KURL&, const String&); 228 PLATFORM_EXPORT bool operator==(const KURL&, const String&);
227 PLATFORM_EXPORT bool operator==(const String&, const KURL&); 229 PLATFORM_EXPORT bool operator==(const String&, const KURL&);
228 PLATFORM_EXPORT bool operator!=(const KURL&, const KURL&); 230 PLATFORM_EXPORT bool operator!=(const KURL&, const KURL&);
229 PLATFORM_EXPORT bool operator!=(const KURL&, const String&); 231 PLATFORM_EXPORT bool operator!=(const KURL&, const String&);
230 PLATFORM_EXPORT bool operator!=(const String&, const KURL&); 232 PLATFORM_EXPORT bool operator!=(const String&, const KURL&);
231 233
232 PLATFORM_EXPORT bool equalIgnoringFragmentIdentifier(const KURL&, const KURL&); 234 PLATFORM_EXPORT bool equalIgnoringFragmentIdentifier(const KURL&, const KURL&);
233 235
234 PLATFORM_EXPORT const KURL& blankURL(); 236 PLATFORM_EXPORT const KURL& blankURL();
235 PLATFORM_EXPORT const KURL& srcdocURL();
236 237
237 // Functions to do URL operations on strings. 238 // Functions to do URL operations on strings.
238 // These are operations that aren't faster on a parsed URL. 239 // These are operations that aren't faster on a parsed URL.
239 // These are also different from the KURL functions in that they don't require 240 // These are also different from the KURL functions in that they don't require
240 // the string to be a valid and parsable URL. This is especially important 241 // the string to be a valid and parsable URL. This is especially important
241 // because valid javascript URLs are not necessarily considered valid by KURL. 242 // because valid javascript URLs are not necessarily considered valid by KURL.
242 243
243 PLATFORM_EXPORT bool protocolIs(const String& url, const char* protocol); 244 PLATFORM_EXPORT bool protocolIs(const String& url, const char* protocol);
244 PLATFORM_EXPORT bool protocolIsJavaScript(const String& url); 245 PLATFORM_EXPORT bool protocolIsJavaScript(const String& url);
245 246
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 292
292 // KURLHash is the default hash for String 293 // KURLHash is the default hash for String
293 template <> 294 template <>
294 struct DefaultHash<blink::KURL> { 295 struct DefaultHash<blink::KURL> {
295 typedef blink::KURLHash Hash; 296 typedef blink::KURLHash Hash;
296 }; 297 };
297 298
298 } // namespace WTF 299 } // namespace WTF
299 300
300 #endif // KURL_h 301 #endif // KURL_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698