summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net/referrer.h
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-23 01:00:16 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-23 01:00:16 +0000
commit1da70a5924f41d7e2682c43e175b1b05796d13d4 (patch)
tree7bcfc3707c6c9c9da2f09a67c8297ebe2b56f101 /chrome/browser/net/referrer.h
parent8aedc4467d45c234ff5d201f1bc41fd18d8cb7c7 (diff)
downloadchromium_src-1da70a5924f41d7e2682c43e175b1b05796d13d4.zip
chromium_src-1da70a5924f41d7e2682c43e175b1b05796d13d4.tar.gz
chromium_src-1da70a5924f41d7e2682c43e175b1b05796d13d4.tar.bz2
Handle race between deleting a low use referrer acruing value
Prevent a DCHECK from firing. As we adaptively learn about referrers to enhance DNS pre-resolution, we are forced to evict some entries to prevent accidentally getting really large lists (when we make mistakes). Sometimes we evict a referred item from a list *while* that item is being resolved (because it was in teh list). In that case, we have to be careful when we try to acrue credit (latency savings). r=paulg Review URL: http://codereview.chromium.org/18527 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8531 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/referrer.h')
-rw-r--r--chrome/browser/net/referrer.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/chrome/browser/net/referrer.h b/chrome/browser/net/referrer.h
index 455b9b7..d3fb12e 100644
--- a/chrome/browser/net/referrer.h
+++ b/chrome/browser/net/referrer.h
@@ -47,13 +47,13 @@ typedef std::map<std::string, ReferrerValue> HostNameMap;
//------------------------------------------------------------------------------
// There is one Referrer instance for each hostname that has acted as an HTTP
-// referer (note mispelling is intentional) for a domain that was otherwise
-// unexpectedly navgated towards ("unexpected" in the sense that the domain was
-// probably for a subresource of a page, and was not otherwise predictable until
-// the content with the reference arrived). Most typically, an outer page was a
-// page fetched by the user, and this instance lists names in HostNameMap which
-// are subresources and that were needed to complete the rendering of the outer
-// page.
+// referer (note mispelling is intentional) for a hostname that was otherwise
+// unexpectedly navgated towards ("unexpected" in the sense that the hostname
+// was probably needad as a subresource of a page, and was not otherwise
+// predictable until the content with the reference arrived). Most typically,
+// an outer page was a page fetched by the user, and this instance lists names
+// in HostNameMap which are subresources and that were needed to complete the
+// rendering of the outer page.
class Referrer : public HostNameMap {
public:
// Add the indicated host to the list of hosts that are resolved via DNS when
@@ -69,7 +69,7 @@ class Referrer : public HostNameMap {
// Helper function for pruning list. Metric for usefulness is "large accrued
// value," in the form of latency_ savings associated with a host name. We
// also give credit for a name being newly added, by scalling latency per
- // lifetime (time since birth). For instance, when to names have accrued
+ // lifetime (time since birth). For instance, when two names have accrued
// the same latency_ savings, the older one is less valuable as it didn't
// accrue savings as quickly.
void DeleteLeastUseful();