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

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

Issue 1928823002: Simplifying finishing a load on Resource (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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 6c23408758d9af40db04572e91476aa76ebbb761..ff49288d3c89a16b80c715ef6e3e207f82c5b55a 100644
--- a/third_party/WebKit/Source/core/fetch/Resource.cpp
+++ b/third_party/WebKit/Source/core/fetch/Resource.cpp
@@ -324,24 +324,27 @@ void Resource::markClientsAndObserversFinished()
}
}
-void Resource::error(Resource::Status status)
+void Resource::error(const ResourceError& error)
{
+ ASSERT(!error.isNull());
+ m_error = error;
if (!m_revalidatingRequest.isNull())
m_revalidatingRequest = ResourceRequest();
- if (!m_error.isNull() && (m_error.isCancellation() || !isPreloaded()))
+ if (m_error.isCancellation() || !isPreloaded())
memoryCache()->remove(this);
- setStatus(status);
+ setStatus(LoadError);
ASSERT(errorOccurred());
m_data.clear();
checkNotify();
markClientsAndObserversFinished();
}
-void Resource::finish()
+void Resource::finish(double loadFinishTime)
{
ASSERT(m_revalidatingRequest.isNull());
+ m_loadFinishTime = loadFinishTime;
if (!errorOccurred())
m_status = Cached;
checkNotify();
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.h ('k') | third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698