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

Unified Diff: chrome/browser/net/referrer.cc

Issue 10773: Fixed two simple compilations that stopped browser/net/referrer.cc from compi... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 1 month 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/referrer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/referrer.cc
===================================================================
--- chrome/browser/net/referrer.cc (revision 5702)
+++ chrome/browser/net/referrer.cc (working copy)
@@ -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()) {
« no previous file with comments | « chrome/browser/net/referrer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698