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

Side by Side 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: Created 5 years, 4 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 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 class CORE_EXPORT ThreadableLoader : public RefCounted<ThreadableLoader> { 118 class CORE_EXPORT ThreadableLoader : public RefCounted<ThreadableLoader> {
119 WTF_MAKE_NONCOPYABLE(ThreadableLoader); 119 WTF_MAKE_NONCOPYABLE(ThreadableLoader);
120 public: 120 public:
121 // ThreadableLoaderOptions argument configures this ThreadableLoader's 121 // ThreadableLoaderOptions argument configures this ThreadableLoader's
122 // behavior. 122 // behavior.
123 // 123 //
124 // ResourceLoaderOptions argument will be passed to the FetchRequest 124 // ResourceLoaderOptions argument will be passed to the FetchRequest
125 // that this ThreadableLoader creates. It can be altered e.g. when 125 // that this ThreadableLoader creates. It can be altered e.g. when
126 // redirect happens. 126 // redirect happens.
127 static void loadResourceSynchronously(ExecutionContext&, const ResourceR equest&, ThreadableLoaderClient&, const ThreadableLoaderOptions&, const Resource LoaderOptions&); 127 static void loadResourceSynchronously(ExecutionContext&, const ResourceR equest&, ThreadableLoaderClient&, const ThreadableLoaderOptions&, const Resource LoaderOptions&);
128 static PassRefPtr<ThreadableLoader> create(ExecutionContext&, Threadable LoaderClient*, const ResourceRequest&, const ThreadableLoaderOptions&, const Res ourceLoaderOptions&); 128 static PassRefPtr<ThreadableLoader> create(ExecutionContext&, Threadable LoaderClient*, const ThreadableLoaderOptions&, const ResourceLoaderOptions&);
hiroshige 2015/07/28 11:35:37 From the CL description:
hiroshige 2015/07/28 11:35:37 What is the reason for moving ResourceRequest& arg
tyoshino (SeeGerritForStatus) 2015/07/28 12:21:50 ResourceRequest is not stored in a member variable
tyoshino (SeeGerritForStatus) 2015/07/28 12:21:51 Ah, I see. It also works! Maybe we should move alm
tyoshino (SeeGerritForStatus) 2015/07/28 12:36:54 Hmm, but this needs much work. Can I postpone it?
tyoshino (SeeGerritForStatus) 2015/07/28 12:36:55 Updated the CL description.
hiroshige 2015/07/30 12:07:21 Yes. Then please add a comment stating that Thread
tyoshino (SeeGerritForStatus) 2015/07/31 08:00:42 Done.
129
130 virtual void start(const ResourceRequest&) = 0;
129 131
130 // A ThreadableLoader may have a timeout specified. It is possible, in s ome cases, for 132 // A ThreadableLoader may have a timeout specified. It is possible, in s ome cases, for
131 // the timeout to be overridden after the request is sent (for example, XMLHttpRequests 133 // the timeout to be overridden after the request is sent (for example, XMLHttpRequests
132 // may override their timeout setting after sending). 134 // may override their timeout setting after sending).
133 // 135 //
134 // Set a new timeout relative to the time the request started, in millis econds. 136 // Set a new timeout relative to the time the request started, in millis econds.
135 virtual void overrideTimeout(unsigned long timeoutMilliseconds) = 0; 137 virtual void overrideTimeout(unsigned long timeoutMilliseconds) = 0;
136 138
137 virtual void cancel() = 0; 139 virtual void cancel() = 0;
138 140
139 virtual ~ThreadableLoader() { } 141 virtual ~ThreadableLoader() { }
140 142
141 protected: 143 protected:
142 ThreadableLoader() { } 144 ThreadableLoader() { }
143 }; 145 };
144 146
145 } // namespace blink 147 } // namespace blink
146 148
147 #endif // ThreadableLoader_h 149 #endif // ThreadableLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698