Refactoring: Extract SafeSearch code from the supervised user codebase |
||
Issue descriptionThe 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.
,
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
,
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
,
Apr 16 2018
Martin, what's the status of this bug? Can we close it?
,
Apr 16 2018
Yes. |
||
►
Sign in to add a comment |
||
Comment 1 by msramek@chromium.org
, Oct 7 2016