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

Unified Diff: net/base/net_util.cc

Issue 1096783005: QUIC - Collect performance stats for QUIC vs non-QUIC when google (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comments for PatchSet 3 Created 5 years, 8 months 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 | « net/base/net_util.h ('k') | net/base/net_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.cc
diff --git a/net/base/net_util.cc b/net/base/net_util.cc
index c893e6164d0301196d9dcff4709bd977baa4a130..d3048975b175426e11fc3f60a073df8b5b76f411 100644
--- a/net/base/net_util.cc
+++ b/net/base/net_util.cc
@@ -1031,6 +1031,29 @@ bool IsLocalhostTLD(const std::string& host) {
0;
}
+bool HasGoogleHost(const GURL& url) {
+ static const char* kGoogleHostSuffixes[] = {
+ ".google.com",
+ ".youtube.com",
+ ".gmail.com",
+ ".doubleclick.net",
+ ".gstatic.com",
+ ".googlevideo.com",
+ ".googleusercontent.com",
+ ".googlesyndication.com",
+ ".google-analytics.com",
+ ".googleadservices.com",
+ ".googleapis.com",
+ ".ytimg.com",
+ };
+ const std::string& host = url.host();
+ for (const char* suffix : kGoogleHostSuffixes) {
+ if (EndsWith(host, suffix, false))
+ return true;
+ }
+ return false;
+}
+
NetworkInterface::NetworkInterface()
: type(NetworkChangeNotifier::CONNECTION_UNKNOWN), prefix_length(0) {
}
« no previous file with comments | « net/base/net_util.h ('k') | net/base/net_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698