diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-26 17:44:32 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-26 17:44:32 +0000 |
commit | 981c6093c6eed55776a58e77bacdcfcc3bbe3af0 (patch) | |
tree | 21d09f92119c0bd2e493e26191f211e8fd21f2ce /chrome/browser/net/referrer.cc | |
parent | d5a38ba40bc09d7a3a0a8f6ee8d419c1094bcf11 (diff) | |
download | chromium_src-981c6093c6eed55776a58e77bacdcfcc3bbe3af0.zip chromium_src-981c6093c6eed55776a58e77bacdcfcc3bbe3af0.tar.gz chromium_src-981c6093c6eed55776a58e77bacdcfcc3bbe3af0.tar.bz2 |
Fixed two simple compilations that stopped browser/net/referrer.cc
from compiling on linux.
Patch by Kunal Thakar <kunalt@gmail.com>,
original CL: http://codereview.chromium.org/10773
Review URL: http://codereview.chromium.org/12674
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6034 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/referrer.cc')
-rw-r--r-- | chrome/browser/net/referrer.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/net/referrer.cc b/chrome/browser/net/referrer.cc index a4b0812..d055ab9 100644 --- a/chrome/browser/net/referrer.cc +++ b/chrome/browser/net/referrer.cc @@ -9,6 +9,13 @@ namespace chrome_browser_net { void Referrer::SuggestHost(const std::string& host) { + // Limit how large our list can get, in case we start make mistakes about + // what hostnames are in sub-resources (example: Some advertisments have + // a link to the ad agency, and then provide a "surprising" redirect to + // the advertised entity, which appears to be a subresource on the page + // hosting the ad). + static const size_t kMaxSuggestions = 8; + if (host.empty()) return; if (kMaxSuggestions <= size()) { |