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

Unified Diff: Source/core/html/parser/HTMLResourcePreloader.h

Issue 104943004: Have preloader handle crossorigin resources better. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Initialize m_allowCredentials in the constructor Created 7 years 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 | « Source/core/html/parser/HTMLPreloadScanner.cpp ('k') | Source/core/html/parser/HTMLResourcePreloader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/parser/HTMLResourcePreloader.h
diff --git a/Source/core/html/parser/HTMLResourcePreloader.h b/Source/core/html/parser/HTMLResourcePreloader.h
index a72880f601895443a36c03be06b3114588e6dca7..48686b6ca73870fefb9cb8c907ee18832ed58db7 100644
--- a/Source/core/html/parser/HTMLResourcePreloader.h
+++ b/Source/core/html/parser/HTMLResourcePreloader.h
@@ -53,7 +53,12 @@ public:
const String& media() const { return m_mediaAttribute; }
double discoveryTime() const { return m_discoveryTime; }
void setCharset(const String& charset) { m_charset = charset.isolatedCopy(); }
- void setCrossOriginModeAllowsCookies(bool allowsCookies) { m_crossOriginModeAllowsCookies = allowsCookies; }
+ void setCrossOriginEnabled(StoredCredentials allowCredentials)
+ {
+ m_isCORSEnabled = true;
+ m_allowCredentials = allowCredentials;
+ }
+
Resource::Type resourceType() const { return m_resourceType; }
private:
@@ -64,7 +69,8 @@ private:
, m_baseURL(baseURL.copy())
, m_resourceType(resourceType)
, m_mediaAttribute(mediaAttribute.isolatedCopy())
- , m_crossOriginModeAllowsCookies(false)
+ , m_isCORSEnabled(false)
+ , m_allowCredentials(DoNotAllowStoredCredentials)
, m_discoveryTime(monotonicallyIncreasingTime())
{
}
@@ -78,7 +84,8 @@ private:
String m_charset;
Resource::Type m_resourceType;
String m_mediaAttribute;
- bool m_crossOriginModeAllowsCookies;
+ bool m_isCORSEnabled;
+ StoredCredentials m_allowCredentials;
double m_discoveryTime;
};
« no previous file with comments | « Source/core/html/parser/HTMLPreloadScanner.cpp ('k') | Source/core/html/parser/HTMLResourcePreloader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698