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

Unified Diff: chrome/browser/google/google_util.h

Issue 10108026: Transmit a X-Chrome-UMA-Enabled bit to Google domains from clients that have UMA enabled. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Made threading fixes Created 8 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 | « no previous file | chrome/browser/google/google_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google/google_util.h
diff --git a/chrome/browser/google/google_util.h b/chrome/browser/google/google_util.h
index 95ae4b9b933c7fe28d1bcf3fee3aa245f61d2464..d44afdca9aaa50eb8ace26aad56ebffcf5fbc05b 100644
--- a/chrome/browser/google/google_util.h
+++ b/chrome/browser/google/google_util.h
@@ -46,8 +46,20 @@ bool GetReactivationBrand(std::string* brand);
// need to restrict some behavior to only happen on Google's officially-owned
// domains, use TransportSecurityState::IsGooglePinnedProperty() instead.
-// True if |host| is "[www.]google.<TLD>" with a valid TLD.
-bool IsGoogleHostname(const std::string& host);
+// Designate whether or not a URL checking function also checks for specific
+// subdomains, or only "www" and empty subdomains.
+enum SubdomainPermission {
+ ALLOW_SUBDOMAIN,
+ DISALLOW_SUBDOMAIN,
+};
+
+// True if |url| is an HTTP[S] request with host "[www.]google.<TLD>" and no
+// explicit port. If |allow_subdomain| is true, we check against host
MAD 2012/04/17 18:16:28 Maybe fix this comment to the new param type not b
SteveT 2012/04/17 18:20:46 Done.
+// "*.google.<TLD>" instead.
+bool IsGoogleDomainUrl(const std::string& url, SubdomainPermission permission);
+// True if |host| is "[www.]google.<TLD>" with a valid TLD. If
+// |allow_subdomain| is true, we check against host "*.google.<TLD>" instead.
MAD 2012/04/17 18:16:28 Same here...
SteveT 2012/04/17 18:20:46 Done.
+bool IsGoogleHostname(const std::string& host, SubdomainPermission permission);
// True if |url| represents a valid Google home page URL.
bool IsGoogleHomePageUrl(const std::string& url);
// True if |url| represents a valid Google search URL.
« no previous file with comments | « no previous file | chrome/browser/google/google_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698