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

Issue 354183002: Enforce SafetyMode for YouTube if prefs::kForceSafeSearch is on. (Closed)

Created:
6 years, 5 months ago by Marc Treib
Modified:
6 years, 5 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

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/ BUG=344815 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282546

Patch Set 1 #

Patch Set 2 : cleanup #

Total comments: 4

Patch Set 3 : add comments; move into own files #

Patch Set 4 : fix include #

Patch Set 5 : add test #

Total comments: 1

Patch Set 6 : YouTube #

Total comments: 10

Patch Set 7 : review comments #

Total comments: 1

Patch Set 8 : Move&use helpers from web_request_api_helpers #

Total comments: 6

Patch Set 9 : cookie parsing test #

Total comments: 6

Patch Set 10 : review comments #

Total comments: 6

Patch Set 11 : review comments #

Patch Set 12 : revert string_util.h change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+490 lines, -127 lines) Patch
M chrome/browser/extensions/api/web_request/web_request_api_helpers.cc View 1 2 3 4 5 6 7 4 chunks +5 lines, -66 lines 0 comments Download
M chrome/browser/net/chrome_network_delegate.cc View 1 2 3 4 5 6 7 8 6 chunks +8 lines, -60 lines 0 comments Download
A chrome/browser/net/safe_search_util.h View 1 2 3 4 5 6 1 chunk +29 lines, -0 lines 0 comments Download
A chrome/browser/net/safe_search_util.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +195 lines, -0 lines 0 comments Download
A chrome/browser/net/safe_search_util_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +90 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M net/cookies/cookie_util.h View 1 2 3 4 5 6 7 8 2 chunks +22 lines, -1 line 0 comments Download
M net/cookies/cookie_util.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +53 lines, -0 lines 0 comments Download
M net/cookies/cookie_util_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +85 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (0 generated)
Marc Treib
battre@chromium.org: Please review changes in c/b/net brettw@chromium.org: Please review changes in base/strings
6 years, 5 months ago (2014-07-07 07:47:49 UTC) #1
battre
https://codereview.chromium.org/354183002/diff/20001/chrome/browser/net/chrome_network_delegate.cc File chrome/browser/net/chrome_network_delegate.cc (right): https://codereview.chromium.org/354183002/diff/20001/chrome/browser/net/chrome_network_delegate.cc#newcode166 chrome/browser/net/chrome_network_delegate.cc:166: const char kYoutubePrefCookieName[] = "PREF"; What do you think ...
6 years, 5 months ago (2014-07-07 09:00:06 UTC) #2
Marc Treib
PTAL again. Thanks! https://codereview.chromium.org/354183002/diff/20001/chrome/browser/net/chrome_network_delegate.cc File chrome/browser/net/chrome_network_delegate.cc (right): https://codereview.chromium.org/354183002/diff/20001/chrome/browser/net/chrome_network_delegate.cc#newcode166 chrome/browser/net/chrome_network_delegate.cc:166: const char kYoutubePrefCookieName[] = "PREF"; On ...
6 years, 5 months ago (2014-07-07 16:06:46 UTC) #3
Pam (message me for reviews)
Adding Erik as a reviewer for a quick look at the cookie manipulation -- mostly ...
6 years, 5 months ago (2014-07-07 19:23:10 UTC) #4
battre
LGTM. Thanks. I agree that it would be great if Erik could take a look. ...
6 years, 5 months ago (2014-07-08 13:43:06 UTC) #5
Marc Treib
https://codereview.chromium.org/354183002/diff/100001/chrome/browser/net/safe_search_util.cc File chrome/browser/net/safe_search_util.cc (right): https://codereview.chromium.org/354183002/diff/100001/chrome/browser/net/safe_search_util.cc#newcode66 chrome/browser/net/safe_search_util.cc:66: const char kYouTubePrefCookieFlagsValueFormat[] = "%x"; On 2014/07/08 13:43:06, battre ...
6 years, 5 months ago (2014-07-08 14:16:15 UTC) #6
erikwright (departed)
https://codereview.chromium.org/354183002/diff/120001/chrome/browser/net/safe_search_util.cc File chrome/browser/net/safe_search_util.cc (right): https://codereview.chromium.org/354183002/diff/120001/chrome/browser/net/safe_search_util.cc#newcode110 chrome/browser/net/safe_search_util.cc:110: headers->GetHeader(base::StringPiece(net::HttpRequestHeaders::kCookie), Of course, the Chrome cookie store does not ...
6 years, 5 months ago (2014-07-08 14:28:26 UTC) #7
Marc Treib
On 2014/07/08 14:28:26, erikwright wrote: > https://codereview.chromium.org/354183002/diff/120001/chrome/browser/net/safe_search_util.cc > File chrome/browser/net/safe_search_util.cc (right): > > https://codereview.chromium.org/354183002/diff/120001/chrome/browser/net/safe_search_util.cc#newcode110 > ...
6 years, 5 months ago (2014-07-09 12:33:46 UTC) #8
battre
On 2014/07/09 12:33:46, treib wrote: > On 2014/07/08 14:28:26, erikwright wrote: > > > https://codereview.chromium.org/354183002/diff/120001/chrome/browser/net/safe_search_util.cc ...
6 years, 5 months ago (2014-07-09 12:41:04 UTC) #9
erikwright (departed)
https://codereview.chromium.org/354183002/diff/140001/chrome/browser/net/safe_search_util.cc File chrome/browser/net/safe_search_util.cc (right): https://codereview.chromium.org/354183002/diff/140001/chrome/browser/net/safe_search_util.cc#newcode125 chrome/browser/net/safe_search_util.cc:125: // The pref cookie's value again consists of key/value ...
6 years, 5 months ago (2014-07-09 15:36:23 UTC) #10
Marc Treib
https://codereview.chromium.org/354183002/diff/140001/chrome/browser/net/safe_search_util.cc File chrome/browser/net/safe_search_util.cc (right): https://codereview.chromium.org/354183002/diff/140001/chrome/browser/net/safe_search_util.cc#newcode125 chrome/browser/net/safe_search_util.cc:125: // The pref cookie's value again consists of key/value ...
6 years, 5 months ago (2014-07-10 09:03:37 UTC) #11
battre
https://codereview.chromium.org/354183002/diff/160001/chrome/browser/net/safe_search_util.cc File chrome/browser/net/safe_search_util.cc (right): https://codereview.chromium.org/354183002/diff/160001/chrome/browser/net/safe_search_util.cc#newcode150 chrome/browser/net/safe_search_util.cc:150: std::string pref_string = JoinStringKeyValuePairs(pref_values, '=', '&'); I wonder whether ...
6 years, 5 months ago (2014-07-10 10:02:56 UTC) #12
Marc Treib
https://codereview.chromium.org/354183002/diff/160001/chrome/browser/net/safe_search_util.cc File chrome/browser/net/safe_search_util.cc (right): https://codereview.chromium.org/354183002/diff/160001/chrome/browser/net/safe_search_util.cc#newcode150 chrome/browser/net/safe_search_util.cc:150: std::string pref_string = JoinStringKeyValuePairs(pref_values, '=', '&'); On 2014/07/10 10:02:56, ...
6 years, 5 months ago (2014-07-10 11:35:46 UTC) #13
battre
Thanks, LGTM
6 years, 5 months ago (2014-07-10 11:52:14 UTC) #14
erikwright (departed)
https://codereview.chromium.org/354183002/diff/180001/base/strings/string_util.cc File base/strings/string_util.cc (right): https://codereview.chromium.org/354183002/diff/180001/base/strings/string_util.cc#newcode620 base/strings/string_util.cc:620: static std::string JoinStringKeyValuePair( These methods are only used from ...
6 years, 5 months ago (2014-07-10 14:26:24 UTC) #15
Marc Treib
-brettw as his review is not required anymore (moved string util functions into local files) ...
6 years, 5 months ago (2014-07-10 15:40:39 UTC) #16
erikwright (departed)
LGTM.
6 years, 5 months ago (2014-07-10 15:45:35 UTC) #17
Marc Treib
The CQ bit was checked by treib@chromium.org
6 years, 5 months ago (2014-07-10 16:01:32 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/treib@chromium.org/354183002/220001
6 years, 5 months ago (2014-07-10 16:03:58 UTC) #19
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_chromium_gn_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-10 17:56:43 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 5 months ago (2014-07-10 18:04:51 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/linux_chromium_gn_rel/builds/24581)
6 years, 5 months ago (2014-07-10 18:04:52 UTC) #22
Pam (message me for reviews)
The CQ bit was checked by pam@chromium.org
6 years, 5 months ago (2014-07-10 22:32:22 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/treib@chromium.org/354183002/220001
6 years, 5 months ago (2014-07-10 22:33:26 UTC) #24
commit-bot: I haz the power
6 years, 5 months ago (2014-07-11 04:54:46 UTC) #25
Message was sent while issue was closed.
Change committed as 282546

Powered by Google App Engine
This is Rietveld 408576698