Enforce SafetyMode for YouTube if prefs::kForceSafeSearch is on, by modifying (or...
commit184799df208e7334473d5c8f8782e9f1b434cf6c
authortreib@chromium.org <treib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 22 Jul 2014 16:03:24 +0000 (22 16:03 +0000)
committertreib@chromium.org <treib@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 22 Jul 2014 16:03:24 +0000 (22 16:03 +0000)
treecbff3be522178d32a1de66a71f34911c64473b82
parent9dfd5a04dd7fdee58bdf7983efde2996b11d4661
Enforce SafetyMode for YouTube if prefs::kForceSafeSearch is on, by modifying (or adding) YouTube's PrefCookie in the HTTP header.

This is essentially a followup to https://codereview.chromium.org/11186002/

Note: This is a fixed reland of crrev.com/282546 / https://codereview.chromium.org/354183002/ which was reverted due to a bug in ParseRequestCookieLine.

TBRing since it has already been reviewed in the first try.

TBR=erikwright@chromium.org

BUG=344815

Review URL: https://codereview.chromium.org/388823002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284687 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/extensions/api/web_request/web_request_api_helpers.cc
chrome/browser/net/chrome_network_delegate.cc
chrome/browser/net/safe_search_util.cc [new file with mode: 0644]
chrome/browser/net/safe_search_util.h [new file with mode: 0644]
chrome/browser/net/safe_search_util_unittest.cc [new file with mode: 0644]
chrome/chrome_browser.gypi
chrome/chrome_tests_unit.gypi
net/cookies/cookie_util.cc
net/cookies/cookie_util.h
net/cookies/cookie_util_unittest.cc