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

Unified Diff: Source/core/platform/network/chromium/ResourceHandleInternal.h

Issue 14246006: Implementing timeout support for XHR (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@timeoutResourceHandle
Patch Set: Rebased, cancel method accepting error argument. Created 7 years, 8 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/platform/network/chromium/ResourceHandleInternal.h
diff --git a/Source/core/platform/network/chromium/ResourceHandleInternal.h b/Source/core/platform/network/chromium/ResourceHandleInternal.h
index 6a915516b15dff118f2e0c453dd39cdc7b0a542b..da9a281804c9f2366e4ec58a3487d8cf74d30b67 100644
--- a/Source/core/platform/network/chromium/ResourceHandleInternal.h
+++ b/Source/core/platform/network/chromium/ResourceHandleInternal.h
@@ -32,6 +32,8 @@
#define ResourceHandleInternal_h
#include "ResourceRequest.h"
+#include "ResourceError.h"
+#include "Timer.h"
#include <public/WebCommon.h>
#include <public/WebURLLoader.h>
#include <public/WebURLLoaderClient.h>
@@ -50,7 +52,7 @@ public:
virtual ~ResourceHandleInternal() { }
void start();
- void cancel();
+ void cancel(const ResourceError& = ResourceError());
void setDefersLoading(bool);
bool allowStoredCredentials() const;
void didChangePriority(WebKit::WebURLRequest::Priority);
@@ -86,6 +88,8 @@ public:
static ResourceHandleInternal* FromResourceHandle(ResourceHandle*);
private:
+ void timerFired(Timer<ResourceHandleInternal>*);
Dominik Röttsches 2013/04/22 15:47:45 Now private.
+
RefPtr<NetworkingContext> m_context;
ResourceRequest m_request;
ResourceHandle* m_owner;
@@ -95,6 +99,8 @@ private:
// Used for sanity checking to make sure we don't experience illegal state
// transitions.
ConnectionState m_state;
+
+ Timer<ResourceHandleInternal> m_timeoutTimer;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698