Only grant permissions to new extensions from sync if they have the expected version
[chromium-blink-merge.git] / chrome / browser / net / safe_search_util.h
blob2e9a0edb7afe9f269d3fc777d9d45627fd381751
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_NET_SAFE_SEARCH_UTIL_H_
6 #define CHROME_BROWSER_NET_SAFE_SEARCH_UTIL_H_
8 class GURL;
10 namespace net {
11 class HttpRequestHeaders;
12 class URLRequest;
15 namespace safe_search_util {
17 // If |request| is a request to Google Web Search, enforces that the SafeSearch
18 // query parameters are set to active. Sets |new_url| to a copy of the request
19 // url in which the query part contains the new values of the parameters.
20 void ForceGoogleSafeSearch(const net::URLRequest* request, GURL* new_url);
22 // If |request| is a request to YouTube, enforces YouTube's Safety Mode by
23 // setting YouTube's Safety Mode header.
24 void ForceYouTubeSafetyMode(const net::URLRequest* request,
25 net::HttpRequestHeaders* headers);
27 int GetForceGoogleSafeSearchCountForTesting();
28 int GetForceYouTubeSafetyModeCountForTesting();
29 void ClearForceGoogleSafeSearchCountForTesting();
30 void ClearForceYouTubeSafetyModeCountForTesting();
32 } // namespace safe_search_util
34 #endif // CHROME_BROWSER_NET_SAFE_SEARCH_UTIL_H_