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

Unified Diff: Source/core/loader/DocumentThreadableLoader.h

Issue 14246006: Implementing timeout support for XHR (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@timeoutResourceHandle
Patch Set: Timeout support in DocumentThreadableLoader (rebased after eb2eb02c34d16c) Created 7 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: Source/core/loader/DocumentThreadableLoader.h
diff --git a/Source/core/loader/DocumentThreadableLoader.h b/Source/core/loader/DocumentThreadableLoader.h
index da0afb6fdb1194ce2acb67d89ecd6008b0607636..e4e357cf712b4fcb4b56af3d0949f77213a53b04 100644
--- a/Source/core/loader/DocumentThreadableLoader.h
+++ b/Source/core/loader/DocumentThreadableLoader.h
@@ -35,6 +35,8 @@
#include "core/loader/ThreadableLoader.h"
#include "core/loader/cache/CachedRawResource.h"
#include "core/loader/cache/CachedResourceHandle.h"
+#include "core/platform/Timer.h"
+#include "core/platform/network/ResourceError.h"
#include <wtf/Forward.h>
#include <wtf/OwnPtr.h>
#include <wtf/PassRefPtr.h>
@@ -57,6 +59,7 @@ namespace WebCore {
virtual ~DocumentThreadableLoader();
virtual void cancel();
+ void cancel(const ResourceError&);
virtual void setDefersLoading(bool);
using RefCounted<DocumentThreadableLoader>::ref;
@@ -93,6 +96,7 @@ namespace WebCore {
void makeCrossOriginAccessRequestWithPreflight(const ResourceRequest& request);
void preflightSuccess();
void preflightFailure(unsigned long identifier, const String& url, const String& errorDescription);
+ void timedOut(Timer<DocumentThreadableLoader>*);
abarth-chromium 2013/05/17 05:10:40 didTimeout?
void loadRequest(const ResourceRequest&, SecurityCheckPolicy);
bool isAllowedRedirect(const KURL&) const;
@@ -108,6 +112,7 @@ namespace WebCore {
bool m_simpleRequest;
bool m_async;
OwnPtr<ResourceRequest> m_actualRequest; // non-null during Access Control preflight checks
+ Timer<DocumentThreadableLoader> m_timeoutTimer;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698