Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Unified Diff: chrome/browser/net/preconnect.h

Issue 3032014: Support both preconnection, and pre-resolution for subresources... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/net/connect_interceptor.cc ('k') | chrome/browser/net/preconnect.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/preconnect.h
===================================================================
--- chrome/browser/net/preconnect.h (revision 54027)
+++ chrome/browser/net/preconnect.h (working copy)
@@ -10,6 +10,7 @@
#pragma once
#include "base/ref_counted.h"
+#include "chrome/browser/net/url_info.h"
#include "net/base/completion_callback.h"
#include "net/base/host_port_pair.h"
#include "net/socket/client_socket_handle.h"
@@ -20,9 +21,14 @@
class Preconnect : public net::CompletionCallback {
public:
- static bool PreconnectOnUIThread(const GURL& url);
+ // Try to preconnect. Typically motivated by OMNIBOX to reach search service.
+ static void PreconnectOnUIThread(const GURL& url,
+ UrlInfo::ResolutionMotivation motivation);
- static void PreconnectOnIOThread(const GURL& url);
+ // Try to preconnect. Typically used by predictor when a subresource probably
+ // needs a connection.
+ static void PreconnectOnIOThread(const GURL& url,
+ UrlInfo::ResolutionMotivation motivation);
static void SetPreconnectDespiteProxy(bool status) {
preconnect_despite_proxy_ = status;
« no previous file with comments | « chrome/browser/net/connect_interceptor.cc ('k') | chrome/browser/net/preconnect.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698