summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net/preconnect.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/net/preconnect.h')
-rw-r--r--chrome/browser/net/preconnect.h24
1 files changed, 5 insertions, 19 deletions
diff --git a/chrome/browser/net/preconnect.h b/chrome/browser/net/preconnect.h
index f7d574d..d773636 100644
--- a/chrome/browser/net/preconnect.h
+++ b/chrome/browser/net/preconnect.h
@@ -19,8 +19,7 @@
namespace chrome_browser_net {
-class Preconnect : public net::CompletionCallback,
- public base::RefCountedThreadSafe<Preconnect> {
+class Preconnect : public net::CompletionCallback {
public:
// Try to preconnect. Typically motivated by OMNIBOX to reach search service.
static void PreconnectOnUIThread(const GURL& url,
@@ -36,15 +35,11 @@ class Preconnect : public net::CompletionCallback,
}
private:
- friend class base::RefCountedThreadSafe<Preconnect>;
+ Preconnect() {}
- explicit Preconnect(UrlInfo::ResolutionMotivation motivation)
- : motivation_(motivation) {
- }
- ~Preconnect();
-
- // Request actual connection.
- void Connect(const GURL& url);
+ // Supply an instance that could have been used in an IO callback, but will
+ // never actually be used (because we reset the connection so quickly).
+ static Preconnect* callback_instance_;
// IO Callback which whould be performed when the connection is established.
virtual void RunWithParams(const Tuple1<int>& params);
@@ -55,15 +50,6 @@ class Preconnect : public net::CompletionCallback,
// much work anway).
static bool preconnect_despite_proxy_;
- // The handle holding the request. We need this so that we can mark the
- // request as speculative when an actual socket is bound to it.
- net::ClientSocketHandle handle_;
-
- // Generally either LEARNED_REFERAL_MOTIVATED or OMNIBOX_MOTIVATED to indicate
- // why we were trying to do a preconnection.
- const UrlInfo::ResolutionMotivation motivation_;
-
-
DISALLOW_COPY_AND_ASSIGN(Preconnect);
};
} // chrome_browser_net