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

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

Issue 273993002: Allow XHR timeout attribute to be overridden after send(), per spec (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed accuracy issues with removed Timer methods Created 6 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 unified diff | Download patch
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&); 57 static void loadResourceSynchronously(Document&, const ResourceRequest&, ThreadableLoaderClient&, const ThreadableLoaderOptions&);
58 static PassRefPtr<DocumentThreadableLoader> create(Document&, Threadable LoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&); 58 static PassRefPtr<DocumentThreadableLoader> create(Document&, Threadable LoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&);
59 virtual ~DocumentThreadableLoader(); 59 virtual ~DocumentThreadableLoader();
60 60
61 virtual void overrideTimeout(unsigned long timeout) OVERRIDE;
62
61 virtual void cancel() OVERRIDE; 63 virtual void cancel() OVERRIDE;
62 void setDefersLoading(bool); 64 void setDefersLoading(bool);
63 65
64 private: 66 private:
65 enum BlockingBehavior { 67 enum BlockingBehavior {
66 LoadSynchronously, 68 LoadSynchronously,
67 LoadAsynchronously 69 LoadAsynchronously
68 }; 70 };
69 71
70 DocumentThreadableLoader(Document&, ThreadableLoaderClient*, BlockingBeh avior, const ResourceRequest&, const ThreadableLoaderOptions&); 72 DocumentThreadableLoader(Document&, ThreadableLoaderClient*, BlockingBeh avior, const ResourceRequest&, const ThreadableLoaderOptions&);
(...skipping 23 matching lines...) Expand all
94 96
95 ThreadableLoaderClient* m_client; 97 ThreadableLoaderClient* m_client;
96 Document& m_document; 98 Document& m_document;
97 ThreadableLoaderOptions m_options; 99 ThreadableLoaderOptions m_options;
98 bool m_sameOriginRequest; 100 bool m_sameOriginRequest;
99 bool m_simpleRequest; 101 bool m_simpleRequest;
100 bool m_async; 102 bool m_async;
101 OwnPtr<ResourceRequest> m_actualRequest; // non-null during Access Contr ol preflight checks 103 OwnPtr<ResourceRequest> m_actualRequest; // non-null during Access Contr ol preflight checks
102 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i n case of a cross-origin redirect. 104 HTTPHeaderMap m_simpleRequestHeaders; // stores simple request headers i n case of a cross-origin redirect.
103 Timer<DocumentThreadableLoader> m_timeoutTimer; 105 Timer<DocumentThreadableLoader> m_timeoutTimer;
106 double m_requestStarted;
tyoshino (SeeGerritForStatus) 2014/05/12 09:21:17 please add a comment to explain on what kind of ev
104 }; 107 };
105 108
106 } // namespace WebCore 109 } // namespace WebCore
107 110
108 #endif // DocumentThreadableLoader_h 111 #endif // DocumentThreadableLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698