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

Unified Diff: third_party/WebKit/Source/core/fetch/Resource.cpp

Issue 2199713002: Refactoring: Make member variables in Resource private (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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: third_party/WebKit/Source/core/fetch/Resource.cpp
diff --git a/third_party/WebKit/Source/core/fetch/Resource.cpp b/third_party/WebKit/Source/core/fetch/Resource.cpp
index 968fa5594a8f3b4cbf8a0794991f4cf11be0ad59..adf843dd7e9831f464f8fd72224979f566c5ea9f 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.cpp
+++ b/third_party/WebKit/Source/core/fetch/Resource.cpp
@@ -39,6 +39,7 @@
#include "platform/network/HTTPParsers.h"
#include "platform/weborigin/KURL.h"
#include "public/platform/Platform.h"
+#include "public/platform/WebCachePolicy.h"
#include "public/platform/WebScheduler.h"
#include "public/platform/WebSecurityOrigin.h"
#include "wtf/CurrentTime.h"
@@ -294,8 +295,7 @@ void Resource::ResourceCallback::runTask()
}
Resource::Resource(const ResourceRequest& request, Type type, const ResourceLoaderOptions& options)
- : m_resourceRequest(request)
- , m_loadFinishTime(0)
+ : m_loadFinishTime(0)
, m_identifier(0)
, m_encodedSize(0)
, m_decodedSize(0)
@@ -312,6 +312,7 @@ Resource::Resource(const ResourceRequest& request, Type type, const ResourceLoad
, m_options(options)
, m_responseTimestamp(currentTime())
, m_cancelTimer(this, &Resource::cancelTimerFired)
+ , m_resourceRequest(request)
{
ASSERT(m_type == unsigned(type)); // m_type is a bitfield, so this tests careless updates of the enum.
InstanceCounters::incrementCounter(InstanceCounters::ResourceCounter);
@@ -900,6 +901,16 @@ String Resource::getMemoryDumpName() const
return String::format("web_cache/%s_resources/%ld", resourceTypeToString(getType(), options().initiatorInfo), m_identifier);
}
+void Resource::setCachePolicyBypassingCache()
+{
+ m_resourceRequest.setCachePolicy(WebCachePolicy::BypassingCache);
+}
+
+void Resource::setLoFiStateOff()
+{
+ m_resourceRequest.setLoFiState(WebURLRequest::LoFiOff);
+}
+
void Resource::revalidationSucceeded(const ResourceResponse& validatingResponse)
{
SECURITY_CHECK(m_redirectChain.isEmpty());
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.h ('k') | third_party/WebKit/Source/core/fetch/XSLStyleSheetResource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698