Index: content/renderer/render_thread_impl.cc |
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
index 5fe2984fd116ddc99da82aac920e70bef0775dce..551f59134b639eafd368fd2fe36dbb469d459a68 100644 |
--- a/content/renderer/render_thread_impl.cc |
+++ b/content/renderer/render_thread_impl.cc |
@@ -22,6 +22,7 @@ |
#include "base/single_thread_task_runner.h" |
#include "base/strings/string16.h" |
#include "base/strings/string_number_conversions.h" |
+#include "base/strings/string_split.h" |
#include "base/strings/string_tokenizer.h" |
#include "base/strings/sys_string_conversions.h" |
#include "base/strings/utf_string_conversions.h" |
@@ -288,6 +289,28 @@ std::string HostToCustomHistogramSuffix(const std::string& host) { |
return ".inbox"; |
if (host == "www.youtube.com") |
return ".youtube"; |
+ |
+ // The Top10 sites have different TLD and/or subdomains |
+ // depending on the localization |
+ if (host == "sina.com.cn") |
+ return ".top10"; |
+ |
+ std::vector<base::StringPiece> host_tokens = base::SplitStringPiece( |
+ host, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); |
+ |
+ if (host_tokens.size() == 3) { |
+ if ((host_tokens[1] == "facebook") || |
+ (host_tokens[1] == "baidu") || |
+ (host_tokens[1] == "yahoo") || |
+ (host_tokens[1] == "amazon") || |
+ (host_tokens[1] == "qq") || |
+ (host_tokens[1] == "twitter") || |
+ (host_tokens[1] == "taobao") || |
+ (host_tokens[1] == "live") || |
+ (host_tokens[1] == "linkedin")) |
jochen (gone - plz use gerrit)
2015/10/21 13:17:57
according to http://www.alexa.com/topsites linkedi
Michael Hablich
2015/10/22 13:16:35
You are right: Removed linkedin, added wikipedia
|
+ return ".top10"; |
+ } |
+ |
return std::string(); |
} |