Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / net / preconnect.h
blob6e8442c92c57f5ff9ab35995878190e08b1b69e5
1 // Copyright (c) 2012 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.
5 // A Preconnect instance maintains state while a TCP/IP connection is made, and
6 // and then released into the pool of available connections for future use.
8 #ifndef CHROME_BROWSER_NET_PRECONNECT_H_
9 #define CHROME_BROWSER_NET_PRECONNECT_H_
11 #include "chrome/browser/net/url_info.h"
13 class GURL;
15 namespace net {
16 class URLRequestContextGetter;
19 namespace chrome_browser_net {
21 // Try to preconnect. Typically motivated by OMNIBOX to reach search service.
22 // |count| may be used to request more than one connection be established in
23 // parallel.
24 void PreconnectOnUIThread(const GURL& url,
25 const GURL& first_party_for_cookies,
26 UrlInfo::ResolutionMotivation motivation,
27 int count,
28 net::URLRequestContextGetter* getter);
30 // Try to preconnect. Typically used by predictor when a subresource probably
31 // needs a connection. |count| may be used to request more than one connection
32 // be established in parallel.
33 void PreconnectOnIOThread(const GURL& url,
34 const GURL& first_party_for_cookies,
35 UrlInfo::ResolutionMotivation motivation,
36 int count,
37 net::URLRequestContextGetter* getter);
39 } // namespace chrome_browser_net
41 #endif // CHROME_BROWSER_NET_PRECONNECT_H_