New issue
Advanced search Search tips

Issue 653479 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Refactoring: Extract SafeSearch code from the supervised user codebase

Project Member Reported by msramek@chromium.org, Oct 6 2016

Issue description

The SafeSearch client in Chrome has been implemented as a part of the supervised users project, to prevent supervised users from accessing unsafe content.

Extract it from that codebase to make it reusable for other features.

 
This change will also move some supervised users metrics out of the supervised_users/ directory.

We have to make sure that the performance of other SafeSearch users is not recorded in those metrics. Either move them back to the supervised_users/ code, or rename them to reflect that they are now applicable to SafeSearch itself.

Project Member

Comment 2 by bugdroid1@chromium.org, Oct 10 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d8fd3b32ad7ee05cbfe2ada60e1d7086ac5e6255

commit d8fd3b32ad7ee05cbfe2ada60e1d7086ac5e6255
Author: msramek <msramek@chromium.org>
Date: Mon Oct 10 14:36:15 2016

Extract the SafeSearch client to a separate directory

1. Extract SupervisedUserAsyncURLChecker and its unittest to a separate
directory to make it reusable. Rename it to SafeSearchURLChecker
as it's now available not only to supervised users, and as its
asynchronicity does not need to be stressed (as there is no synchronous
counterpart).

2. Decople it from the suprevised_users/ code; namely, introduce a
SafeSearchURLChecker::Classification enum that has a direct mapping to
SupervisedUserURLFilter::FilteringBehavior instead of using
FilteringBehavior directly.

3. Update the callsites in supervised_users/, headers, etc. No functional
changes to the code have been made in this CL.

BUG= 653479 

Review-Url: https://codereview.chromium.org/2399823002
Cr-Commit-Position: refs/heads/master@{#424149}

[modify] https://crrev.com/d8fd3b32ad7ee05cbfe2ada60e1d7086ac5e6255/chrome/browser/BUILD.gn
[add] https://crrev.com/d8fd3b32ad7ee05cbfe2ada60e1d7086ac5e6255/chrome/browser/safe_search_api/OWNERS
[rename] https://crrev.com/d8fd3b32ad7ee05cbfe2ada60e1d7086ac5e6255/chrome/browser/safe_search_api/safe_search_url_checker.cc
[add] https://crrev.com/d8fd3b32ad7ee05cbfe2ada60e1d7086ac5e6255/chrome/browser/safe_search_api/safe_search_url_checker.h
[rename] https://crrev.com/d8fd3b32ad7ee05cbfe2ada60e1d7086ac5e6255/chrome/browser/safe_search_api/safe_search_url_checker_unittest.cc
[delete] https://crrev.com/872e1ba031bf6c7ea6ae39f10a23f80e34db6791/chrome/browser/supervised_user/experimental/supervised_user_async_url_checker.h
[modify] https://crrev.com/d8fd3b32ad7ee05cbfe2ada60e1d7086ac5e6255/chrome/browser/supervised_user/supervised_user_url_filter.cc
[modify] https://crrev.com/d8fd3b32ad7ee05cbfe2ada60e1d7086ac5e6255/chrome/browser/supervised_user/supervised_user_url_filter.h
[modify] https://crrev.com/d8fd3b32ad7ee05cbfe2ada60e1d7086ac5e6255/chrome/test/BUILD.gn

Project Member

Comment 3 by bugdroid1@chromium.org, Oct 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f97276943c4780c90a28c8062f00b171ef89f6c4

commit f97276943c4780c90a28c8062f00b171ef89f6c4
Author: msramek <msramek@chromium.org>
Date: Tue Oct 11 12:48:55 2016

Remove SafeSearchURLCheckerTest.Equivalence which doesn't test anything

SafeSearchURLCheckerTest.Equivalence contains three unused variables
named |url_response|. After removing these unused variables, the test
only verifies that the callback is called, which is already covered
by SafeSearchURLCheckerTest.Simple.

The test hints at URL normalization functionality which is, however,
not implemented.

BUG= 653479 

Review-Url: https://codereview.chromium.org/2404933002
Cr-Commit-Position: refs/heads/master@{#424410}

[modify] https://crrev.com/f97276943c4780c90a28c8062f00b171ef89f6c4/chrome/browser/safe_search_api/safe_search_url_checker_unittest.cc

Martin, what's the status of this bug? Can we close it?
Status: Fixed (was: Started)
Yes.

Sign in to add a comment