summaryrefslogtreecommitdiffstats
path: root/net/base
diff options
context:
space:
mode:
authorgavinp@google.com <gavinp@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-31 01:30:03 +0000
committergavinp@google.com <gavinp@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-31 01:30:03 +0000
commitc9c6f5cbd15124457b0fe77f03fda9e4c4855f48 (patch)
treec23bd4ba9fbe29cfd872bc38f4f3b808c39fd949 /net/base
parent8dd21c4de17c8011703f3ac5a6e155b6325f65a2 (diff)
downloadchromium_src-c9c6f5cbd15124457b0fe77f03fda9e4c4855f48.zip
chromium_src-c9c6f5cbd15124457b0fe77f03fda9e4c4855f48.tar.gz
chromium_src-c9c6f5cbd15124457b0fe77f03fda9e4c4855f48.tar.bz2
Implement prefetching in chrome
With this CL (see also issue 2910009), chrome will support basic prefetching. You can optionally deactivate prefetching with the command line argument --disable-prefetch. A new RequestPriority was created as well, IDLE, which is lower than LOWEST. Unfortunately, SPDY has only two bits for priority, so as a temporary measure (pending SPDY v3 which will have three), we have a mapping in SPDY that folds net::LOWEST and net::IDLE together. BUG=13505 TEST=http://gemal.dk/browserspy/prefetch.php Review URL: http://codereview.chromium.org/3050016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54421 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r--net/base/host_resolver_impl.cc3
-rw-r--r--net/base/request_priority.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/net/base/host_resolver_impl.cc b/net/base/host_resolver_impl.cc
index 8d5fe26..43889ac 100644
--- a/net/base/host_resolver_impl.cc
+++ b/net/base/host_resolver_impl.cc
@@ -560,7 +560,8 @@ class HostResolverImpl::IPv6ProbeJob
// and increasing for lower priorities.
COMPILE_ASSERT(HIGHEST == 0u &&
LOWEST > HIGHEST &&
- NUM_PRIORITIES > LOWEST,
+ IDLE > LOWEST &&
+ NUM_PRIORITIES > IDLE,
priority_indexes_incompatible);
// JobPool contains all the information relating to queued requests, including
diff --git a/net/base/request_priority.h b/net/base/request_priority.h
index 6d9b2a5..ca7a1ec 100644
--- a/net/base/request_priority.h
+++ b/net/base/request_priority.h
@@ -15,10 +15,10 @@ enum RequestPriority {
MEDIUM,
LOW,
LOWEST,
+ IDLE,
NUM_PRIORITIES,
};
} // namespace net
#endif // NET_BASE_REQUEST_PRIORITY_H__
-