Index: chrome/browser/net/safe_search_util.h |
diff --git a/chrome/browser/net/safe_search_util.h b/chrome/browser/net/safe_search_util.h |
index 2e9a0edb7afe9f269d3fc777d9d45627fd381751..0aa75b6e5e8f855a02dc79236962755ea152cb5b 100644 |
--- a/chrome/browser/net/safe_search_util.h |
+++ b/chrome/browser/net/safe_search_util.h |
@@ -14,20 +14,32 @@ class URLRequest; |
namespace safe_search_util { |
+// Values for YouTube Restricted Mode. |
+// VALUES MUST COINCIDE WITH ForceYouTubeRestrict POLICY. |
+enum YouTubeRestrictMode { |
+ YTRM_OFF = 0, // Do not enforce a restriction on YouTube content. YouTube |
Thiemo Nagel
2016/08/12 12:12:20
Nit: Please don't use abbreviations. I'd suggest
ljusten (tachyonic)
2016/08/16 09:24:54
Ohhhkayyy :-)
|
+ // might still restrict based on its user settings. |
+ YTRM_MODERATE = 1, // Enforce at least a moderately strict content filter for |
+ // YouTube. |
+ YTRM_STRICT = 2, // Enforce a strict content filter for YouTube. |
+}; |
+ |
// If |request| is a request to Google Web Search, enforces that the SafeSearch |
// query parameters are set to active. Sets |new_url| to a copy of the request |
// url in which the query part contains the new values of the parameters. |
void ForceGoogleSafeSearch(const net::URLRequest* request, GURL* new_url); |
-// If |request| is a request to YouTube, enforces YouTube's Safety Mode by |
-// setting YouTube's Safety Mode header. |
-void ForceYouTubeSafetyMode(const net::URLRequest* request, |
- net::HttpRequestHeaders* headers); |
+// If |request| is a request to YouTube, enforces a minimum YouTube's Restrict |
Thiemo Nagel
2016/08/12 12:12:20
Nit: The 's is weird here.
ljusten (tachyonic)
2016/08/16 09:24:54
Acknowledged.
|
+// mode by setting YouTube's Restrict header. Forcing to YTRM_OFF will remove |
Thiemo Nagel
2016/08/12 12:12:20
Nit: Present tense is better style, imho.
ljusten (tachyonic)
2016/08/16 09:24:54
I've reformulated that a bit.
|
+// a Restrict header if it exists. |
+void ForceYouTubeRestrict(const net::URLRequest* request, |
+ net::HttpRequestHeaders* headers, |
+ YouTubeRestrictMode mode); |
int GetForceGoogleSafeSearchCountForTesting(); |
-int GetForceYouTubeSafetyModeCountForTesting(); |
+int GetForceYouTubeRestrictCountForTesting(); |
void ClearForceGoogleSafeSearchCountForTesting(); |
-void ClearForceYouTubeSafetyModeCountForTesting(); |
+void ClearForceYouTubeRestrictCountForTesting(); |
} // namespace safe_search_util |