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

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

Issue 356723003: Add 'XHR' to the Resource::Type enum, and use it for XHR requests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Preflight. 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/core/fetch/Resource.h ('k') | Source/core/fetch/ResourceFetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/Resource.cpp
diff --git a/Source/core/fetch/Resource.cpp b/Source/core/fetch/Resource.cpp
index 36d47f13b00e5b33b943f55d748c1403a64c8919..069e2a948a92e93a0fbe7ca7d8a1306ea3314cc5 100644
--- a/Source/core/fetch/Resource.cpp
+++ b/Source/core/fetch/Resource.cpp
@@ -528,7 +528,7 @@ void Resource::allClientsRemoved()
{
if (!m_loader)
return;
- if (m_type == MainResource || m_type == Raw)
+ if (m_type == MainResource || m_type == Raw || m_type == XMLHttpRequest)
cancelTimerFired(&m_cancelTimer);
else if (!m_cancelTimer.isActive())
m_cancelTimer.startOneShot(0, FROM_HERE);
@@ -955,6 +955,8 @@ const char* Resource::resourceTypeToString(Type type, const FetchInitiatorInfo&
return "Imported resource";
case Resource::Media:
return "Media";
+ case Resource::XMLHttpRequest:
+ return "XMLHttpRequest";
}
ASSERT_NOT_REACHED();
return initatorTypeNameToString(initiatorInfo.name);
@@ -990,6 +992,8 @@ const char* ResourceTypeName(Resource::Type type)
return "ImportResource";
case Resource::Media:
return "Media";
+ case Resource::XMLHttpRequest:
+ return "XMLHttpRequest";
}
ASSERT_NOT_REACHED();
return "Unknown";
« no previous file with comments | « Source/core/fetch/Resource.h ('k') | Source/core/fetch/ResourceFetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698