Chromium Code Reviews| Index: content/browser/loader/resource_hints_controller.h |
| diff --git a/content/browser/loader/resource_hints_controller.h b/content/browser/loader/resource_hints_controller.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..c48b648a02b47c3f206927f70bc59fdbc72941e9 |
| --- /dev/null |
| +++ b/content/browser/loader/resource_hints_controller.h |
| @@ -0,0 +1,38 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_BROWSER_LOADER_RESOURCE_HINTS_CONTROLLER_H_ |
| +#define CONTENT_BROWSER_LOADER_RESOURCE_HINTS_CONTROLLER_H_ |
| + |
| +#include "base/macros.h" |
| +#include "net/base/completion_callback.h" |
| +#include "url/gurl.h" |
| + |
| +namespace content { |
| + |
| +class ResourceContext; |
| + |
| +// Scoped to the ResourceDispatcherHostImpl. This class manages DNS |
| +// preresolutions. Once resource hints go through mojo it will also respond to |
| +// mojo requests from Blink to preconnect / preresolve. |
| +class ResourceHintsController { |
| + public: |
| + ResourceHintsController(); |
| + ~ResourceHintsController(); |
| + int PreresolveUrl(content::ResourceContext* resource_context, |
| + const GURL& url, |
| + const net::CompletionCallback& callback); |
| + |
| + private: |
| + struct DnsRequest; |
| + static void OnResolveComplete(std::unique_ptr<DnsRequest> request, |
| + const net::CompletionCallback& callback, |
| + 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
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(ResourceHintsController); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_LOADER_RESOURCE_HINTS_CONTROLLER_H_ |