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

Unified Diff: chrome/browser/net/safe_search_util.h

Issue 354183002: Enforce SafetyMode for YouTube if prefs::kForceSafeSearch is on. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert string_util.h change Created 6 years, 5 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 | « chrome/browser/net/chrome_network_delegate.cc ('k') | chrome/browser/net/safe_search_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
new file mode 100644
index 0000000000000000000000000000000000000000..bee5ec76d3dfd772b8f1b6bfdb15397b87e05ef2
--- /dev/null
+++ b/chrome/browser/net/safe_search_util.h
@@ -0,0 +1,29 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_NET_SAFE_SEARCH_UTIL_H_
+#define CHROME_BROWSER_NET_SAFE_SEARCH_UTIL_H_
+
+class GURL;
+
+namespace net {
+class HttpRequestHeaders;
+class URLRequest;
+}
+
+namespace safe_search_util {
+
+// 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
+// adding/modifying YouTube's PrefCookie header.
+void ForceYouTubeSafetyMode(const net::URLRequest* request,
+ net::HttpRequestHeaders* headers);
+
+} // namespace safe_search_util
+
+#endif // CHROME_BROWSER_NET_SAFE_SEARCH_UTIL_H_
« no previous file with comments | « chrome/browser/net/chrome_network_delegate.cc ('k') | chrome/browser/net/safe_search_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698