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

Issue 7134017: Make safe browsing work in a multi-profile environment. (Closed)

Created:
9 years, 6 months ago by Miranda Callahan
Modified:
9 years, 5 months ago
CC:
chromium-reviews, darin-cc_chromium.org, brettw-cc_chromium.org, Paweł Hajdan Jr., achuith+watch_chromium.org, joi+watch-content_chromium.org, rginda+watch_chromium.org, rdsmith+dwatch_chromium.org
Visibility:
Public.

Description

Make safe browsing work in a multi-profile environment. A single safe browsing service will be triggered per-profile, by passing the profile's safe browsing preference to the ResourceDispatcherHost through the ResourceContext. References to the Default Profile used in starting and configuring the SafeBrowsingService have also been replaced with references to the appropriate profile for each situation. BUG=83770 TEST=safe browsing is triggered correctly. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=92438

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Total comments: 4

Patch Set 11 : '' #

Patch Set 12 : '' #

Total comments: 14

Patch Set 13 : response to mattm's comments. #

Patch Set 14 : '' #

Total comments: 13

Patch Set 15 : holding pattern for the moment #

Patch Set 16 : address joao's comments #

Patch Set 17 : respond to mattm's comment #

Total comments: 2

Patch Set 18 : final tweaks #

Total comments: 2

Patch Set 19 : don't pollute the content layer #

Patch Set 20 : a few nits #

Patch Set 21 : fix DownloadSBClient tests #

Patch Set 22 : fix incognito browser tests #

Total comments: 2

Patch Set 23 : check pref correctly in ChromeContentBrowserClient #

Patch Set 24 : add IPC message to ChromeRenderViewObserver #

Patch Set 25 : a few tweaks in initialization &c #

Total comments: 8

Patch Set 26 : response to mattm's comments #

Total comments: 14

Patch Set 27 : fixed dropped merges, etc. #

Patch Set 28 : fixed client_side_detection_host_unittest #

Patch Set 29 : final run-through with added comment #

Total comments: 2

Patch Set 30 : addressed sky's nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+176 lines, -94 lines) Patch
M chrome/browser/browser_process_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +4 lines, -5 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/download/download_file_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/download/download_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 chunks +6 lines, -2 lines 0 comments Download
M chrome/browser/download/download_safe_browsing_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +7 lines, -2 lines 0 comments Download
M chrome/browser/download/download_safe_browsing_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 3 chunks +8 lines, -4 lines 0 comments Download
M chrome/browser/download/download_safe_browsing_client_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/profiles/off_the_record_profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 3 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +12 lines, -8 lines 0 comments Download
M chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/client_side_detection_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/safe_browsing/client_side_detection_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 7 chunks +18 lines, -26 lines 0 comments Download
M chrome/browser/ui/tab_contents/tab_contents_wrapper.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/tab_contents/tab_contents_wrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 5 chunks +27 lines, -2 lines 0 comments Download
M chrome/common/render_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 2 chunks +1 line, -11 lines 0 comments Download
M chrome/renderer/chrome_render_view_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/renderer/chrome_render_view_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 4 chunks +16 lines, -3 lines 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +6 lines, -4 lines 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +12 lines, -8 lines 0 comments Download
M content/browser/renderer_host/resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
Joao da Silva
Just a couple of comments after a quick glance. I made an attempt at a ...
9 years, 6 months ago (2011-06-22 13:38:03 UTC) #1
Miranda Callahan
Thanks, Joao -- fixed these items and re-uploaded. Still more has to go into this ...
9 years, 6 months ago (2011-06-22 16:25:18 UTC) #2
Miranda Callahan
On 2011/06/22 13:38:03, joaodasilva wrote: > Just a couple of comments after a quick glance. ...
9 years, 6 months ago (2011-06-22 16:26:12 UTC) #3
Miranda Callahan
Ready for review. There are many files here, but only a few lines changed in ...
9 years, 6 months ago (2011-06-22 20:28:18 UTC) #4
mattm
You'll also need to do something about the client side phishing detection. Currently this is ...
9 years, 6 months ago (2011-06-23 01:24:25 UTC) #5
Miranda Callahan
Thanks for the review -- please take another look. http://codereview.chromium.org/7134017/diff/27039/chrome/browser/download/download_file_manager.cc File chrome/browser/download/download_file_manager.cc (right): http://codereview.chromium.org/7134017/diff/27039/chrome/browser/download/download_file_manager.cc#newcode150 chrome/browser/download/download_file_manager.cc:150: ...
9 years, 6 months ago (2011-06-23 14:05:26 UTC) #6
mattm
http://codereview.chromium.org/7134017/diff/27039/chrome/browser/safe_browsing/safe_browsing_service.cc File chrome/browser/safe_browsing/safe_browsing_service.cc (right): http://codereview.chromium.org/7134017/diff/27039/chrome/browser/safe_browsing/safe_browsing_service.cc#newcode168 chrome/browser/safe_browsing/safe_browsing_service.cc:168: Start(); On 2011/06/23 14:05:26, Miranda Callahan wrote: > On ...
9 years, 6 months ago (2011-06-23 21:40:40 UTC) #7
Joao da Silva
While trying to make the SafeBrowsingService react to changes to the preference I stumbled upon ...
9 years, 6 months ago (2011-06-24 14:32:04 UTC) #8
jam
http://codereview.chromium.org/7134017/diff/49008/content/browser/renderer_host/resource_dispatcher_host.cc File content/browser/renderer_host/resource_dispatcher_host.cc (right): http://codereview.chromium.org/7134017/diff/49008/content/browser/renderer_host/resource_dispatcher_host.cc#newcode27 content/browser/renderer_host/resource_dispatcher_host.cc:27: #include "chrome/browser/renderer_host/download_resource_handler.h" You should be getting a deps failure ...
9 years, 5 months ago (2011-07-07 14:31:03 UTC) #9
jam
http://codereview.chromium.org/7134017/diff/48002/content/browser/renderer_host/resource_dispatcher_host_delegate.h File content/browser/renderer_host/resource_dispatcher_host_delegate.h (right): http://codereview.chromium.org/7134017/diff/48002/content/browser/renderer_host/resource_dispatcher_host_delegate.h#newcode48 content/browser/renderer_host/resource_dispatcher_host_delegate.h:48: bool safe_browsing_enabled, This is a layering violation since an ...
9 years, 5 months ago (2011-07-07 14:35:18 UTC) #10
Miranda Callahan
On 2011/07/07 14:35:18, John Abd-El-Malek wrote: > http://codereview.chromium.org/7134017/diff/48002/content/browser/renderer_host/resource_dispatcher_host_delegate.h > File content/browser/renderer_host/resource_dispatcher_host_delegate.h (right): > > http://codereview.chromium.org/7134017/diff/48002/content/browser/renderer_host/resource_dispatcher_host_delegate.h#newcode48 ...
9 years, 5 months ago (2011-07-07 17:35:42 UTC) #11
Miranda Callahan
http://codereview.chromium.org/7134017/diff/33005/chrome/browser/browser_process_impl.cc File chrome/browser/browser_process_impl.cc (right): http://codereview.chromium.org/7134017/diff/33005/chrome/browser/browser_process_impl.cc#newcode1005 chrome/browser/browser_process_impl.cc:1005: profile_manager()->GetDefaultProfile() : NULL; On 2011/06/23 21:40:40, mattm wrote: > ...
9 years, 5 months ago (2011-07-07 17:35:50 UTC) #12
mattm
http://codereview.chromium.org/7134017/diff/33005/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): http://codereview.chromium.org/7134017/diff/33005/chrome/browser/profiles/profile_io_data.cc#newcode498 chrome/browser/profiles/profile_io_data.cc:498: profile_params_->safe_browsing_enabled); On 2011/07/07 17:35:50, Miranda Callahan wrote: > On ...
9 years, 5 months ago (2011-07-07 21:34:55 UTC) #13
Joao da Silva
LGTM, regarding reacting to preference updates. Thanks for working this out!
9 years, 5 months ago (2011-07-08 09:21:02 UTC) #14
Miranda Callahan
Thanks, Matt -- I implemented the pref observation and message passing you suggested; please take ...
9 years, 5 months ago (2011-07-08 14:48:46 UTC) #15
mattm
http://codereview.chromium.org/7134017/diff/57008/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc File chrome/browser/ui/tab_contents/tab_contents_wrapper.cc (right): http://codereview.chromium.org/7134017/diff/57008/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc#newcode131 chrome/browser/ui/tab_contents/tab_contents_wrapper.cc:131: safe_browsing::ClientSideDetectionHost::Create(contents)); Oops, I think I gave some odd advice ...
9 years, 5 months ago (2011-07-08 22:15:24 UTC) #16
Miranda Callahan
Thanks, Matt -- here's another set of changes in response to your comments. http://codereview.chromium.org/7134017/diff/57008/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc File ...
9 years, 5 months ago (2011-07-12 16:24:08 UTC) #17
mattm
http://codereview.chromium.org/7134017/diff/75003/chrome/browser/download/download_file_manager.cc File chrome/browser/download/download_file_manager.cc (left): http://codereview.chromium.org/7134017/diff/75003/chrome/browser/download/download_file_manager.cc#oldcode147 chrome/browser/download/download_file_manager.cc:147: #if defined(ENABLE_SAFE_BROWSING) dropped merge http://codereview.chromium.org/7134017/diff/75003/chrome/browser/profiles/off_the_record_profile_io_data.cc File chrome/browser/profiles/off_the_record_profile_io_data.cc (right): http://codereview.chromium.org/7134017/diff/75003/chrome/browser/profiles/off_the_record_profile_io_data.cc#newcode112 ...
9 years, 5 months ago (2011-07-12 21:41:58 UTC) #18
Miranda Callahan
Sorry for missing these obvious merge failures -- I think everything's fixed now. I had ...
9 years, 5 months ago (2011-07-13 18:13:50 UTC) #19
mattm
LGTM!
9 years, 5 months ago (2011-07-13 19:11:44 UTC) #20
commit-bot: I haz the power
Presubmit check for 7134017-79005 failed and returned exit status 1. Running presubmit commit checks ...
9 years, 5 months ago (2011-07-13 19:14:22 UTC) #21
Miranda Callahan
John and Randy, could you give an OWNERS review for content/browser and chrome/browser/download?
9 years, 5 months ago (2011-07-13 19:18:51 UTC) #22
Miranda Callahan
On 2011/07/13 19:18:51, Miranda Callahan wrote: > John and Randy, could you give an OWNERS ...
9 years, 5 months ago (2011-07-13 19:20:13 UTC) #23
Randy Smith (Not in Mondays)
chrome/browser/download LGTM>
9 years, 5 months ago (2011-07-13 19:23:14 UTC) #24
sky
chrome/browser/ui LGTM http://codereview.chromium.org/7134017/diff/79005/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc File chrome/browser/ui/tab_contents/tab_contents_wrapper.cc (right): http://codereview.chromium.org/7134017/diff/79005/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc#newcode644 chrome/browser/ui/tab_contents/tab_contents_wrapper.cc:644: #if defined(ENABLE_SAFE_BROWSING) Does this really need to ...
9 years, 5 months ago (2011-07-13 20:21:30 UTC) #25
Miranda Callahan
http://codereview.chromium.org/7134017/diff/79005/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc File chrome/browser/ui/tab_contents/tab_contents_wrapper.cc (right): http://codereview.chromium.org/7134017/diff/79005/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc#newcode644 chrome/browser/ui/tab_contents/tab_contents_wrapper.cc:644: #if defined(ENABLE_SAFE_BROWSING) On 2011/07/13 20:21:30, sky wrote: > Does ...
9 years, 5 months ago (2011-07-13 21:13:13 UTC) #26
commit-bot: I haz the power
9 years, 5 months ago (2011-07-13 22:58:52 UTC) #27
Change committed as 92438

Powered by Google App Engine
This is Rietveld 408576698