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

Issue 2623733002: Componentize SafeBrowsingBlockingPage for WebView use (Closed)

Created:
3 years, 11 months ago by Jialiu Lin
Modified:
3 years, 10 months ago
CC:
Nate Fischer, blundell+watchlist_chromium.org, chromium-reviews, droger+watchlist_chromium.org, grt+watch_chromium.org, lpz, Nathan Parker, sdefresne+watchlist_chromium.org, sgurun-gerrit only, vakh (use Gerrit instead)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Componentize SafeBrowsingBlockingPage for WebView use 1. Create a BaseBlockingPage in components/safe_browsing, and move basic user interaction handling logic into this class 2. Implement BaseUIManager::DisplayBlockingPage to work with BaseBlockingPage 3. Make security_interstitials::MetricsHelper a non-abstract class, such that it can be instantiated by BaseBlockingPage 4. Adjust unit_tests and browser_tests 5. Rename BaseSafeBrowsingUIManager to BaseUIManager, BaseSafeBrowsingResourceThrottle to safe_browsing::ResourceThrottle Overall, no logic change in chrome/browser/safe_browsing/SafeBrowsingBlockingPage class BUG=666100 Review-Url: https://codereview.chromium.org/2623733002 Cr-Commit-Position: refs/heads/master@{#443087} Committed: https://chromium.googlesource.com/chromium/src/+/3d6032edf2e884a270692a0fba98637bf525a52b

Patch Set 1 #

Total comments: 4

Patch Set 2 : address comments from ntfischer #

Total comments: 62

Patch Set 3 : address comments from meacer@ and vakh@+Rebase #

Patch Set 4 : rebase again + nits #

Total comments: 30

Patch Set 5 : address comments from meacer@ #

Total comments: 4

Patch Set 6 : address final comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+897 lines, -1139 lines) Patch
M chrome/browser/loader/safe_browsing_resource_throttle.h View 1 2 4 chunks +12 lines, -11 lines 0 comments Download
M chrome/browser/loader/safe_browsing_resource_throttle.cc View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_blocking_page.h View 1 2 3 4 7 chunks +19 lines, -73 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_blocking_page.cc View 1 2 3 4 5 14 chunks +45 lines, -229 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc View 1 2 3 4 4 chunks +26 lines, -8 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc View 1 2 3 4 5 7 chunks +31 lines, -11 lines 0 comments Download
M chrome/browser/safe_browsing/threat_details.h View 1 2 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/safe_browsing/threat_details.cc View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/safe_browsing/ui_manager.h View 1 2 3 4 5 chunks +35 lines, -7 lines 0 comments Download
M chrome/browser/safe_browsing/ui_manager.cc View 1 2 3 4 6 chunks +31 lines, -23 lines 0 comments Download
M chrome/browser/safe_browsing/ui_manager_unittest.cc View 1 2 3 4 2 chunks +8 lines, -6 lines 0 comments Download
M components/safe_browsing/BUILD.gn View 1 2 1 chunk +7 lines, -2 lines 0 comments Download
M components/safe_browsing/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A components/safe_browsing/base_blocking_page.h View 1 2 3 4 5 1 chunk +140 lines, -0 lines 0 comments Download
A components/safe_browsing/base_blocking_page.cc View 1 2 3 4 5 1 chunk +326 lines, -0 lines 0 comments Download
A + components/safe_browsing/base_resource_throttle.h View 1 2 3 8 chunks +26 lines, -22 lines 0 comments Download
A + components/safe_browsing/base_resource_throttle.cc View 1 2 3 17 chunks +50 lines, -47 lines 0 comments Download
D components/safe_browsing/base_safe_browsing_resource_throttle.h View 1 2 3 1 chunk +0 lines, -184 lines 0 comments Download
D components/safe_browsing/base_safe_browsing_resource_throttle.cc View 1 2 3 1 chunk +0 lines, -443 lines 0 comments Download
M components/safe_browsing/base_ui_manager.h View 1 2 4 chunks +22 lines, -31 lines 0 comments Download
M components/safe_browsing/base_ui_manager.cc View 1 2 9 chunks +93 lines, -27 lines 0 comments Download
M components/security_interstitials/content/security_interstitial_page.h View 1 2 3 4 1 chunk +4 lines, -1 line 0 comments Download
M components/security_interstitials/core/metrics_helper.h View 1 chunk +3 lines, -3 lines 0 comments Download
M components/security_interstitials/core/metrics_helper.cc View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 46 (27 generated)
Jialiu Lin
+ntfschr@ for overall refactoring +meacer@ for owner review of components/security_interstitials/ Thanks, Jialiu
3 years, 11 months ago (2017-01-10 00:10:25 UTC) #6
Jialiu Lin
+cc nparker@, lpz@, and vakh@
3 years, 11 months ago (2017-01-10 00:11:24 UTC) #7
Nate Fischer
lgtm Overall, LGTM. Great work! I left a couple comments in-line. https://codereview.chromium.org/2623733002/diff/1/components/safe_browsing/base_safe_browsing_blocking_page.h File components/safe_browsing/base_safe_browsing_blocking_page.h (right): ...
3 years, 11 months ago (2017-01-10 01:21:29 UTC) #8
Jialiu Lin
Thanks! https://codereview.chromium.org/2623733002/diff/1/components/safe_browsing/base_safe_browsing_blocking_page.h File components/safe_browsing/base_safe_browsing_blocking_page.h (right): https://codereview.chromium.org/2623733002/diff/1/components/safe_browsing/base_safe_browsing_blocking_page.h#newcode109 components/safe_browsing/base_safe_browsing_blocking_page.h:109: // is invoked, -1 if not entry should ...
3 years, 11 months ago (2017-01-10 01:54:29 UTC) #9
vakh (use Gerrit instead)
Nice refactor! https://codereview.chromium.org/2623733002/diff/20001/components/safe_browsing/base_safe_browsing_blocking_page.cc File components/safe_browsing/base_safe_browsing_blocking_page.cc (right): https://codereview.chromium.org/2623733002/diff/20001/components/safe_browsing/base_safe_browsing_blocking_page.cc#newcode52 components/safe_browsing/base_safe_browsing_blocking_page.cc:52: sb_error_ui_ = base::MakeUnique<SafeBrowsingErrorUI>( To avoid repetition, re-write ...
3 years, 11 months ago (2017-01-10 20:44:27 UTC) #11
meacer
Looking good! I added a bunch of renaming/refactoring suggestions. https://codereview.chromium.org/2623733002/diff/20001/components/safe_browsing/base_safe_browsing_blocking_page.cc File components/safe_browsing/base_safe_browsing_blocking_page.cc (right): https://codereview.chromium.org/2623733002/diff/20001/components/safe_browsing/base_safe_browsing_blocking_page.cc#newcode33 components/safe_browsing/base_safe_browsing_blocking_page.cc:33: ...
3 years, 11 months ago (2017-01-10 21:18:21 UTC) #12
Jialiu Lin
Thanks for your thorough review, vakh@ and meacer@! All your comments are addressed. https://codereview.chromium.org/2623733002/diff/20001/components/safe_browsing/base_safe_browsing_blocking_page.cc File ...
3 years, 11 months ago (2017-01-11 00:50:07 UTC) #20
Jialiu Lin
+mmenke@ for c/b/loader/* owner review Thanks!
3 years, 11 months ago (2017-01-11 00:53:13 UTC) #22
meacer
Almost lgt and m, with more nits :) https://codereview.chromium.org/2623733002/diff/20001/components/safe_browsing/base_safe_browsing_blocking_page.cc File components/safe_browsing/base_safe_browsing_blocking_page.cc (right): https://codereview.chromium.org/2623733002/diff/20001/components/safe_browsing/base_safe_browsing_blocking_page.cc#newcode48 components/safe_browsing/base_safe_browsing_blocking_page.cc:48: main_frame_url_(main_frame_url), ...
3 years, 11 months ago (2017-01-11 01:33:31 UTC) #23
Jialiu Lin
Thanks meacer@! My latest patch should've addressed all your comments. :-) https://codereview.chromium.org/2623733002/diff/60001/chrome/browser/safe_browsing/safe_browsing_blocking_page.h File chrome/browser/safe_browsing/safe_browsing_blocking_page.h (right): ...
3 years, 11 months ago (2017-01-11 02:53:16 UTC) #26
mmenke
chrome/browser/loader/ LGTM.
3 years, 11 months ago (2017-01-11 16:28:09 UTC) #29
meacer
Thanks! LGTM. https://codereview.chromium.org/2623733002/diff/80001/components/safe_browsing/base_blocking_page.cc File components/safe_browsing/base_blocking_page.cc (right): https://codereview.chromium.org/2623733002/diff/80001/components/safe_browsing/base_blocking_page.cc#newcode89 components/safe_browsing/base_blocking_page.cc:89: const UnsafeResourceList resources{unsafe_resource}; nit: Inline this? new ...
3 years, 11 months ago (2017-01-11 18:59:41 UTC) #30
Jialiu Lin
Thanks! https://codereview.chromium.org/2623733002/diff/80001/components/safe_browsing/base_blocking_page.cc File components/safe_browsing/base_blocking_page.cc (right): https://codereview.chromium.org/2623733002/diff/80001/components/safe_browsing/base_blocking_page.cc#newcode89 components/safe_browsing/base_blocking_page.cc:89: const UnsafeResourceList resources{unsafe_resource}; On 2017/01/11 18:59:40, Mustafa Emre ...
3 years, 11 months ago (2017-01-11 20:13:29 UTC) #33
Jialiu Lin
@vakh, any additional comments?
3 years, 11 months ago (2017-01-11 20:14:32 UTC) #34
vakh (use Gerrit instead)
lgtm
3 years, 11 months ago (2017-01-11 20:23:09 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2623733002/100001
3 years, 11 months ago (2017-01-11 20:26:48 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: android_compile_dbg on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_compile_dbg/builds/192498)
3 years, 11 months ago (2017-01-11 20:34:53 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2623733002/100001
3 years, 11 months ago (2017-01-11 22:14:07 UTC) #43
commit-bot: I haz the power
3 years, 11 months ago (2017-01-12 00:42:34 UTC) #46
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/3d6032edf2e884a270692a0fba98...

Powered by Google App Engine
This is Rietveld 408576698