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

Side by Side Diff: third_party/WebKit/Source/core/loader/CrossOriginPreflightResultCache.cpp

Issue 1818233003: Merge WTF::initializeMainThread into WTF::initialize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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) 2008, 2009 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008, 2009 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 12 matching lines...) Expand all
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 * 24 *
25 */ 25 */
26 26
27 #include "core/loader/CrossOriginPreflightResultCache.h" 27 #include "core/loader/CrossOriginPreflightResultCache.h"
28 28
29 #include "core/fetch/FetchUtils.h" 29 #include "core/fetch/FetchUtils.h"
30 #include "platform/HTTPNames.h" 30 #include "platform/HTTPNames.h"
31 #include "platform/network/ResourceResponse.h" 31 #include "platform/network/ResourceResponse.h"
32 #include "wtf/CurrentTime.h" 32 #include "wtf/CurrentTime.h"
33 #include "wtf/MainThread.h"
34 #include "wtf/StdLibExtras.h" 33 #include "wtf/StdLibExtras.h"
35 34
36 namespace blink { 35 namespace blink {
37 36
38 // These values are at the discretion of the user agent. 37 // These values are at the discretion of the user agent.
39 static const unsigned defaultPreflightCacheTimeoutSeconds = 5; 38 static const unsigned defaultPreflightCacheTimeoutSeconds = 5;
40 static const unsigned maxPreflightCacheTimeoutSeconds = 600; // Should be short enough to minimize the risk of using a poisoned cache after switching to a secur e network. 39 static const unsigned maxPreflightCacheTimeoutSeconds = 600; // Should be short enough to minimize the risk of using a poisoned cache after switching to a secur e network.
41 40
42 static bool parseAccessControlMaxAge(const String& string, unsigned& expiryDelta ) 41 static bool parseAccessControlMaxAge(const String& string, unsigned& expiryDelta )
43 { 42 {
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 return false; 165 return false;
167 166
168 if (cacheIt->value->allowsRequest(includeCredentials, method, requestHeaders )) 167 if (cacheIt->value->allowsRequest(includeCredentials, method, requestHeaders ))
169 return true; 168 return true;
170 169
171 m_preflightHashMap.remove(cacheIt); 170 m_preflightHashMap.remove(cacheIt);
172 return false; 171 return false;
173 } 172 }
174 173
175 } // namespace blink 174 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698