Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_HINTS_CONTROLLER_H_ | |
| 6 #define CONTENT_BROWSER_LOADER_RESOURCE_HINTS_CONTROLLER_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "net/base/completion_callback.h" | |
| 10 #include "url/gurl.h" | |
| 11 | |
| 12 namespace content { | |
| 13 | |
| 14 class ResourceContext; | |
| 15 | |
| 16 // Scoped to the ResourceDispatcherHostImpl. This class manages DNS | |
| 17 // preresolutions. Once resource hints go through mojo it will also respond to | |
| 18 // mojo requests from Blink to preconnect / preresolve. | |
| 19 class ResourceHintsController { | |
| 20 public: | |
| 21 ResourceHintsController(); | |
| 22 ~ResourceHintsController(); | |
| 23 int PreresolveUrl(content::ResourceContext* resource_context, | |
| 24 const GURL& url, | |
| 25 const net::CompletionCallback& callback); | |
| 26 | |
| 27 private: | |
| 28 struct DnsRequest; | |
| 29 static void OnResolveComplete(std::unique_ptr<DnsRequest> request, | |
| 30 const net::CompletionCallback& callback, | |
| 31 int result); | |
|
kinuko
2016/05/25 02:07:04
It looks both DnsRequest and OnResolveComplete can
Charlie Harrison
2016/05/25 12:20:14
Yupp, I removed the class in the latest CL revisio
| |
| 32 | |
| 33 DISALLOW_COPY_AND_ASSIGN(ResourceHintsController); | |
| 34 }; | |
| 35 | |
| 36 } // namespace content | |
| 37 | |
| 38 #endif // CONTENT_BROWSER_LOADER_RESOURCE_HINTS_CONTROLLER_H_ | |
| OLD | NEW |