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

Side by Side Diff: Source/core/loader/DocumentThreadableLoader.h

Issue 333823006: Revert "Allow XHR timeout attribute to be overridden after send(), per spec" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013, Intel Corporation 3 * Copyright (C) 2013, Intel Corporation
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 class SecurityOrigin; 51 class SecurityOrigin;
52 class ThreadableLoaderClient; 52 class ThreadableLoaderClient;
53 53
54 class DocumentThreadableLoader FINAL : public ThreadableLoader, private Resource Owner<RawResource> { 54 class DocumentThreadableLoader FINAL : public ThreadableLoader, private Resource Owner<RawResource> {
55 WTF_MAKE_FAST_ALLOCATED; 55 WTF_MAKE_FAST_ALLOCATED;
56 public: 56 public:
57 static void loadResourceSynchronously(Document&, const ResourceRequest&, ThreadableLoaderClient&, const ThreadableLoaderOptions&, const ResourceLoaderOp tions&); 57 static void loadResourceSynchronously(Document&, const ResourceRequest&, ThreadableLoaderClient&, const ThreadableLoaderOptions&, const ResourceLoaderOp tions&);
58 static PassRefPtr<DocumentThreadableLoader> create(Document&, Threadable LoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&, const Res ourceLoaderOptions&); 58 static PassRefPtr<DocumentThreadableLoader> create(Document&, Threadable LoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&, const Res ourceLoaderOptions&);
59 virtual ~DocumentThreadableLoader(); 59 virtual ~DocumentThreadableLoader();
60 60
61 virtual void overrideTimeout(unsigned long timeout) OVERRIDE;
62
63 virtual void cancel() OVERRIDE; 61 virtual void cancel() OVERRIDE;
64 void setDefersLoading(bool); 62 void setDefersLoading(bool);
65 63
66 private: 64 private:
67 enum BlockingBehavior { 65 enum BlockingBehavior {
68 LoadSynchronously, 66 LoadSynchronously,
69 LoadAsynchronously 67 LoadAsynchronously
70 }; 68 };
71 69
72 DocumentThreadableLoader(Document&, ThreadableLoaderClient*, BlockingBeh avior, const ResourceRequest&, const ThreadableLoaderOptions&, const ResourceLoa derOptions&); 70 DocumentThreadableLoader(Document&, ThreadableLoaderClient*, BlockingBeh avior, const ResourceRequest&, const ThreadableLoaderOptions&, const ResourceLoa derOptions&);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 bool m_simpleRequest; 122 bool m_simpleRequest;
125 bool m_async; 123 bool m_async;
126 124
127 // Holds the original request and options for it during preflight 125 // Holds the original request and options for it during preflight
128 // request handling phase. 126 // request handling phase.
129 OwnPtr<ResourceRequest> m_actualRequest; 127 OwnPtr<ResourceRequest> m_actualRequest;
130 OwnPtr<ResourceLoaderOptions> m_actualOptions; 128 OwnPtr<ResourceLoaderOptions> m_actualOptions;
131 129
132 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i n case of a cross-origin redirect. 130 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i n case of a cross-origin redirect.
133 Timer<DocumentThreadableLoader> m_timeoutTimer; 131 Timer<DocumentThreadableLoader> m_timeoutTimer;
134 double m_requestStartedSeconds; // Time an asynchronous fetch request is started
135 }; 132 };
136 133
137 } // namespace WebCore 134 } // namespace WebCore
138 135
139 #endif // DocumentThreadableLoader_h 136 #endif // DocumentThreadableLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698