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

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: Made the setter method private 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
« no previous file with comments | « Source/platform/exported/WebURLRequest.cpp ('k') | Source/platform/network/ResourceRequest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/network/ResourceRequest.h
diff --git a/Source/platform/network/ResourceRequest.h b/Source/platform/network/ResourceRequest.h
index cb1e7c5a304ac3ff2ce127a54be4f5134dc570e2..5fd376d6900cc927676773f7d835874a1ccbb252 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);
Nate Chapin 2014/06/24 18:28:54 Why is it better to have these static factory meth
clamy 2014/06/25 15:47:11 I thought it was more explicit that they give you
+ 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.
@@ -217,6 +223,8 @@ public:
private:
void initialize(const KURL& url, ResourceRequestCachePolicy cachePolicy);
+ void setTargetTypeForMainResource(bool isMainFrame);
+
const CacheControlHeader& cacheControlHeader() const;
KURL m_url;
« no previous file with comments | « Source/platform/exported/WebURLRequest.cpp ('k') | Source/platform/network/ResourceRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698