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

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

Issue 1264453002: Split the constructor of ThreadableLoader into two methods (ctor and start()) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed #7. Rebased Created 5 years, 5 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/ThreadableLoader.h
diff --git a/Source/core/loader/ThreadableLoader.h b/Source/core/loader/ThreadableLoader.h
index dc8f3ef02e9da2a4776cb0e5e284f45cf2d0d75c..443ce0ecdda06eb462352fafa686c811706d48ae 100644
--- a/Source/core/loader/ThreadableLoader.h
+++ b/Source/core/loader/ThreadableLoader.h
@@ -124,8 +124,15 @@ namespace blink {
// ResourceLoaderOptions argument will be passed to the FetchRequest
// that this ThreadableLoader creates. It can be altered e.g. when
// redirect happens.
+
static void loadResourceSynchronously(ExecutionContext&, const ResourceRequest&, ThreadableLoaderClient&, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
- static PassRefPtr<ThreadableLoader> create(ExecutionContext&, ThreadableLoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
+ // create() must always followed by start() call.
hiroshige 2015/08/10 15:00:05 Please mention that create() never returns null.
tyoshino (SeeGerritForStatus) 2016/01/29 12:36:52 Done.
tyoshino (SeeGerritForStatus) 2016/01/29 12:37:56 This reply had to be published before.
+ // |ThreadableLoaderClient| methods are never called before start() call.
+ static PassRefPtr<ThreadableLoader> create(ExecutionContext&, ThreadableLoaderClient*, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
+
+ // The methods on the |ThreadableLoaderClient| may be called
+ // synchronous to start() call.
+ virtual void start(const ResourceRequest&) = 0;
// A ThreadableLoader may have a timeout specified. It is possible, in some cases, for
// the timeout to be overridden after the request is sent (for example, XMLHttpRequests

Powered by Google App Engine
This is Rietveld 408576698