Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_LOADER_URL_LOADER_REQUEST_HANDLER_H_ | |
| 6 #define CONTENT_BROWSER_LOADER_URL_LOADER_REQUEST_HANDLER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "content/common/url_loader.mojom.h" | |
| 10 | |
| 11 namespace content { | |
| 12 | |
| 13 class ResourceContext; | |
| 14 struct ResourceRequest; | |
| 15 | |
| 16 // An instance of this class is a per-request object and kept around during | |
| 17 // the lifetime of a request (including multiple redirect legs). | |
|
scottmg
2017/05/25 15:12:24
Mention that this is IO thread.
kinuko
2017/05/26 14:30:05
Done.
| |
| 18 class URLLoaderRequestHandler { | |
|
michaeln
2017/05/26 01:28:31
This is looking good, I'm going to focus on this i
kinuko
2017/05/26 02:34:20
Sure. To clarify when you say 'Loader' do you mea
kinuko
2017/05/26 14:30:05
Changed this to MaybeCreateLoaderFactory(base::Cal
michaeln
2017/05/26 21:36:25
I'm just noticing the handoff to the renderer does
| |
| 19 public: | |
| 20 class Controller { | |
| 21 public: | |
| 22 // Forward the request to the next handler. Could be called when the | |
| 23 // calling request handler can't handle the given request. | |
| 24 virtual void Forward(mojom::URLLoaderAssociatedRequest request, | |
| 25 mojom::URLLoaderClientPtr client_ptr) = 0; | |
| 26 }; | |
| 27 | |
| 28 URLLoaderRequestHandler() = default; | |
| 29 virtual ~URLLoaderRequestHandler() = default; | |
| 30 | |
| 31 // Controller should outlive the request handler object. | |
| 32 virtual void Start(const ResourceRequest& resource_request, | |
|
michaeln
2017/05/26 01:43:21
Also, the hand wavvy MaybeCreateLoader(request, co
| |
| 33 Controller* controller, | |
| 34 ResourceContext* resource_context, | |
| 35 mojom::URLLoaderAssociatedRequest loader_request, | |
| 36 mojom::URLLoaderClientPtr loader_client_ptr) = 0; | |
| 37 | |
| 38 private: | |
| 39 DISALLOW_COPY_AND_ASSIGN(URLLoaderRequestHandler); | |
|
jam
2017/05/25 16:06:37
nit: not needed on non-copyable interfaces
kinuko
2017/05/26 14:30:05
Removed.
| |
| 40 }; | |
| 41 | |
| 42 } // namespace content | |
| 43 | |
| 44 #endif // CONTENT_BROWSER_LOADER_URL_LOADER_REQUEST_HANDLER_H_ | |
| OLD | NEW |