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

Unified Diff: Source/platform/network/ResourceRequest.h

Issue 339593005: Set the target type when creating the request for main resource (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 6 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
Index: Source/platform/network/ResourceRequest.h
diff --git a/Source/platform/network/ResourceRequest.h b/Source/platform/network/ResourceRequest.h
index cb1e7c5a304ac3ff2ce127a54be4f5134dc570e2..30521bc3eb1d604cb7db1ceea82e536c2c394077 100644
--- a/Source/platform/network/ResourceRequest.h
+++ b/Source/platform/network/ResourceRequest.h
@@ -99,6 +99,12 @@ public:
setHTTPReferrer(referrer);
}
+ // Factory methods that should be used when creating a ResourceRequest for a
+ // main resource.
+ static ResourceRequest createMainResourceRequest(const KURL&, bool isMainFrame);
+ static ResourceRequest createMainResourceRequest(
+ const KURL&, bool isMainFrame, const Referrer&, ResourceRequestCachePolicy = UseProtocolCachePolicy);
+
static PassOwnPtr<ResourceRequest> adopt(PassOwnPtr<CrossThreadResourceRequestData>);
// Gets a copy of the data suitable for passing to another thread.
@@ -204,6 +210,7 @@ public:
// What this request is for.
TargetType targetType() const { return m_targetType; }
void setTargetType(TargetType type) { m_targetType = type; }
+ void setTargetTypeForMainResource(bool isMainFrame);
ppi 2014/06/24 12:22:21 Do we still need this in public: ?
clamy 2014/06/24 13:57:07 Done.
bool cacheControlContainsNoCache() const;
bool cacheControlContainsNoStore() const;

Powered by Google App Engine
This is Rietveld 408576698