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

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

Issue 12674: Fixed two simple compilations that stopped browser/net/referrer.cc (Closed)
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
diff --git a/chrome/browser/net/referrer.cc b/chrome/browser/net/referrer.cc
index a4b08123f340212053253e65a152ae7613a12c4d..d055ab9a19d4221c826347e3095cb091d93a0383 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()) {
« 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