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

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

Issue 2656443003: Make the uses of Resource::m_resourceRequest/m_response const if applicable (Closed)
Patch Set: Rebase Created 3 years, 11 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 | third_party/WebKit/Source/core/fetch/Resource.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/fetch/Resource.h
diff --git a/third_party/WebKit/Source/core/fetch/Resource.h b/third_party/WebKit/Source/core/fetch/Resource.h
index f78725a8b5f01b9524e7d8b4dd1108e50bb9110a..36c8eefe47767bd3a5e9736d003ab1dcd2cbc47c 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.h
+++ b/third_party/WebKit/Source/core/fetch/Resource.h
@@ -148,7 +148,7 @@ class CORE_EXPORT Resource : public GarbageCollectedFinalized<Resource>,
// This url can have a fragment, but it can match resources that differ by the
// fragment only.
- const KURL& url() const { return m_resourceRequest.url(); }
+ const KURL& url() const { return resourceRequest().url(); }
Type getType() const { return static_cast<Type>(m_type); }
const ResourceLoaderOptions& options() const { return m_options; }
ResourceLoaderOptions& mutableOptions() { return m_options; }
@@ -267,9 +267,9 @@ class CORE_EXPORT Resource : public GarbageCollectedFinalized<Resource>,
--m_preloadCount;
}
- bool canReuseRedirectChain();
- bool mustRevalidateDueToCacheHeaders();
- bool canUseCacheValidator();
+ bool canReuseRedirectChain() const;
+ bool mustRevalidateDueToCacheHeaders() const;
+ bool canUseCacheValidator() const;
bool isCacheValidator() const { return m_isRevalidating; }
bool hasCacheControlNoStoreHeader() const;
bool hasVaryHeader() const;
@@ -290,8 +290,8 @@ class CORE_EXPORT Resource : public GarbageCollectedFinalized<Resource>,
bool mustRefetchDueToIntegrityMetadata(const FetchRequest&) const;
double currentAge() const;
- double freshnessLifetime();
- double stalenessLifetime();
+ double freshnessLifetime() const;
+ double stalenessLifetime() const;
bool isAlive() const { return m_isAlive; }
@@ -371,7 +371,7 @@ class CORE_EXPORT Resource : public GarbageCollectedFinalized<Resource>,
void didRemoveClientOrObserver();
virtual void allClientsAndObserversRemoved();
- bool hasClient(ResourceClient* client) {
+ bool hasClient(ResourceClient* client) const {
return m_clients.contains(client) ||
m_clientsAwaitingCallback.contains(client) ||
m_finishedClients.contains(client);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/fetch/Resource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698