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

Unified Diff: Source/core/loader/CrossOriginPreflightResultCache.h

Issue 1187563005: Code cleanup in core/loader/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/loader/CrossOriginPreflightResultCache.h
diff --git a/Source/core/loader/CrossOriginPreflightResultCache.h b/Source/core/loader/CrossOriginPreflightResultCache.h
index 45ba723656676ce67060953ad153312f4c91837e..160086d6f9cf73c76a0250eb84655e07b3801d04 100644
--- a/Source/core/loader/CrossOriginPreflightResultCache.h
+++ b/Source/core/loader/CrossOriginPreflightResultCache.h
@@ -36,50 +36,50 @@
namespace blink {
- class HTTPHeaderMap;
- class ResourceResponse;
+class HTTPHeaderMap;
+class ResourceResponse;
- class CrossOriginPreflightResultCacheItem {
- WTF_MAKE_NONCOPYABLE(CrossOriginPreflightResultCacheItem); WTF_MAKE_FAST_ALLOCATED(CrossOriginPreflightResultCacheItem);
- public:
- CrossOriginPreflightResultCacheItem(StoredCredentials credentials)
- : m_absoluteExpiryTime(0)
- , m_credentials(credentials)
- {
- }
+class CrossOriginPreflightResultCacheItem {
+ WTF_MAKE_NONCOPYABLE(CrossOriginPreflightResultCacheItem); WTF_MAKE_FAST_ALLOCATED(CrossOriginPreflightResultCacheItem);
+public:
+ CrossOriginPreflightResultCacheItem(StoredCredentials credentials)
+ : m_absoluteExpiryTime(0)
+ , m_credentials(credentials)
+ {
+ }
- bool parse(const ResourceResponse&, String& errorDescription);
- bool allowsCrossOriginMethod(const String&, String& errorDescription) const;
- bool allowsCrossOriginHeaders(const HTTPHeaderMap&, String& errorDescription) const;
- bool allowsRequest(StoredCredentials, const String& method, const HTTPHeaderMap& requestHeaders) const;
+ bool parse(const ResourceResponse&, String& errorDescription);
+ bool allowsCrossOriginMethod(const String&, String& errorDescription) const;
+ bool allowsCrossOriginHeaders(const HTTPHeaderMap&, String& errorDescription) const;
+ bool allowsRequest(StoredCredentials, const String& method, const HTTPHeaderMap& requestHeaders) const;
- private:
- typedef HashSet<String, CaseFoldingHash> HeadersSet;
+private:
+ typedef HashSet<String, CaseFoldingHash> HeadersSet;
- // FIXME: A better solution to holding onto the absolute expiration time might be
- // to start a timer for the expiration delta that removes this from the cache when
- // it fires.
- double m_absoluteExpiryTime;
- StoredCredentials m_credentials;
- HashSet<String> m_methods;
- HeadersSet m_headers;
- };
+ // FIXME: A better solution to holding onto the absolute expiration time might be
+ // to start a timer for the expiration delta that removes this from the cache when
+ // it fires.
+ double m_absoluteExpiryTime;
+ StoredCredentials m_credentials;
+ HashSet<String> m_methods;
+ HeadersSet m_headers;
+};
- class CrossOriginPreflightResultCache {
- WTF_MAKE_NONCOPYABLE(CrossOriginPreflightResultCache); WTF_MAKE_FAST_ALLOCATED(CrossOriginPreflightResultCache);
- public:
- static CrossOriginPreflightResultCache& shared();
+class CrossOriginPreflightResultCache {
+ WTF_MAKE_NONCOPYABLE(CrossOriginPreflightResultCache); WTF_MAKE_FAST_ALLOCATED(CrossOriginPreflightResultCache);
+public:
+ static CrossOriginPreflightResultCache& shared();
- void appendEntry(const String& origin, const KURL&, PassOwnPtr<CrossOriginPreflightResultCacheItem>);
- bool canSkipPreflight(const String& origin, const KURL&, StoredCredentials, const String& method, const HTTPHeaderMap& requestHeaders);
+ void appendEntry(const String& origin, const KURL&, PassOwnPtr<CrossOriginPreflightResultCacheItem>);
+ bool canSkipPreflight(const String& origin, const KURL&, StoredCredentials, const String& method, const HTTPHeaderMap& requestHeaders);
- private:
- CrossOriginPreflightResultCache() { }
+private:
+ CrossOriginPreflightResultCache() { }
- typedef HashMap<std::pair<String, KURL>, OwnPtr<CrossOriginPreflightResultCacheItem>> CrossOriginPreflightResultHashMap;
+ typedef HashMap<std::pair<String, KURL>, OwnPtr<CrossOriginPreflightResultCacheItem>> CrossOriginPreflightResultHashMap;
- CrossOriginPreflightResultHashMap m_preflightHashMap;
- };
+ CrossOriginPreflightResultHashMap m_preflightHashMap;
+};
} // namespace blink
« no previous file with comments | « no previous file | Source/core/loader/DocumentLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698