OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef HEADLESS_PUBLIC_UTIL_MANAGED_DISPATCH_URL_REQUEST_JOB_H_ | 5 #ifndef HEADLESS_PUBLIC_UTIL_MANAGED_DISPATCH_URL_REQUEST_JOB_H_ |
6 #define HEADLESS_PUBLIC_UTIL_MANAGED_DISPATCH_URL_REQUEST_JOB_H_ | 6 #define HEADLESS_PUBLIC_UTIL_MANAGED_DISPATCH_URL_REQUEST_JOB_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "headless/public/headless_export.h" |
9 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
10 #include "net/url_request/url_request.h" | 11 #include "net/url_request/url_request.h" |
11 #include "net/url_request/url_request_job.h" | 12 #include "net/url_request/url_request_job.h" |
12 | 13 |
13 namespace headless { | 14 namespace headless { |
14 class URLRequestDispatcher; | 15 class URLRequestDispatcher; |
15 | 16 |
16 // A ManagedDispatchURLRequestJob exists to allow a URLRequestDispatcher control | 17 // A ManagedDispatchURLRequestJob exists to allow a URLRequestDispatcher control |
17 // the order in which a set of fetches complete. Typically this is done to make | 18 // the order in which a set of fetches complete. Typically this is done to make |
18 // fetching deterministic. NOTE URLRequestDispatcher sub classes use | 19 // fetching deterministic. NOTE URLRequestDispatcher sub classes use |
19 // OnHeadersComplete and OnStartError to drive the URLRequestJob. | 20 // OnHeadersComplete and OnStartError to drive the URLRequestJob. |
20 class ManagedDispatchURLRequestJob : public net::URLRequestJob { | 21 class HEADLESS_EXPORT ManagedDispatchURLRequestJob : public net::URLRequestJob { |
21 public: | 22 public: |
22 ManagedDispatchURLRequestJob(net::URLRequest* request, | 23 ManagedDispatchURLRequestJob(net::URLRequest* request, |
23 net::NetworkDelegate* network_delegate, | 24 net::NetworkDelegate* network_delegate, |
24 URLRequestDispatcher* url_request_dispatcher); | 25 URLRequestDispatcher* url_request_dispatcher); |
25 | 26 |
26 ~ManagedDispatchURLRequestJob() override; | 27 ~ManagedDispatchURLRequestJob() override; |
27 | 28 |
28 // Tells the net::URLRequestJob that the data has been fetched and is ready to | 29 // Tells the net::URLRequestJob that the data has been fetched and is ready to |
29 // be consumed. | 30 // be consumed. |
30 // Virtual for FakeManagedDispatchURLRequestJob. | 31 // Virtual for FakeManagedDispatchURLRequestJob. |
(...skipping 21 matching lines...) Expand all Loading... |
52 // DispatchStartError. | 53 // DispatchStartError. |
53 using URLRequestJob::NotifyHeadersComplete; | 54 using URLRequestJob::NotifyHeadersComplete; |
54 using URLRequestJob::NotifyStartError; | 55 using URLRequestJob::NotifyStartError; |
55 | 56 |
56 DISALLOW_COPY_AND_ASSIGN(ManagedDispatchURLRequestJob); | 57 DISALLOW_COPY_AND_ASSIGN(ManagedDispatchURLRequestJob); |
57 }; | 58 }; |
58 | 59 |
59 } // namespace headless | 60 } // namespace headless |
60 | 61 |
61 #endif // HEADLESS_PUBLIC_UTIL_MANAGED_DISPATCH_URL_REQUEST_JOB_H_ | 62 #endif // HEADLESS_PUBLIC_UTIL_MANAGED_DISPATCH_URL_REQUEST_JOB_H_ |
OLD | NEW |