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

Issue 2674973003: Adding a DownloadRestrictions group policy. (Closed)

Created:
3 years, 10 months ago by MAD
Modified:
3 years, 6 months ago
CC:
asvitkine+watch_chromium.org, chromium-reviews, darin-cc_chromium.org, Georges Khalil, jam, noyau+watch_chromium.org, ntp-dev+reviews_chromium.org, tnagel+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding a DownloadRestrictions group policy. TBR=jochen@chromium.org for trivial changes in: chrome/browser/profiles/profile_impl.cc content/public/browser/download_item.h content/public/test/fake_download_item.h content/public/test/fake_download_item.cc content/public/test/mock_download_item.h BUG=683797 Review-Url: https://codereview.chromium.org/2674973003 Cr-Commit-Position: refs/heads/master@{#479465} Committed: https://chromium.googlesource.com/chromium/src/+/4e9c44b9e4a05ba422bbe2f5d62b12d83071b94c

Patch Set 1 #

Patch Set 2 : Rebase #

Patch Set 3 : Test compile fix #

Total comments: 4

Patch Set 4 : Rebase #

Patch Set 5 : Policy template updates. #

Patch Set 6 : Using a specific Block API instead of OnContentCheckCompleted extra argument #

Patch Set 7 : Patch set 5 + rebase #

Total comments: 6

Patch Set 8 : CR Comments 1 #

Patch Set 9 : Rebase #

Patch Set 10 : Moved all files download block into chrome DM delegate. #

Patch Set 11 : Self CR #

Patch Set 12 : Fixed a goof, fortunately caught by a browser test... #

Patch Set 13 : Rebase #

Total comments: 10

Patch Set 14 : Rebase #

Patch Set 15 : Updated policy description wording. #

Total comments: 4

Patch Set 16 : OWNERs comments 1 #

Patch Set 17 : Simple cleanup changes. #

Patch Set 18 : One more... sorry... :-( #

Patch Set 19 : Missed one... :-( #

Total comments: 15

Patch Set 20 : Rebase #

Patch Set 21 : OWNERs comments 2 #

Patch Set 22 : Some oups.... :-) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+344 lines, -47 lines) Patch
M chrome/browser/download/chrome_download_manager_delegate.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/download/chrome_download_manager_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 6 chunks +59 lines, -6 lines 0 comments Download
M chrome/browser/download/chrome_download_manager_delegate_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 chunks +132 lines, -18 lines 0 comments Download
M chrome/browser/download/download_prefs.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +10 lines, -0 lines 0 comments Download
M chrome/browser/download/download_prefs.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/policy/configuration_policy_handler_list_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/test/data/policy/policy_test_cases.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +9 lines, -0 lines 0 comments Download
M components/policy/resources/policy_templates.json View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +59 lines, -1 line 0 comments Download
M content/browser/download/download_item_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +7 lines, -5 lines 0 comments Download
M content/browser/download/download_item_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +7 lines, -2 lines 0 comments Download
M content/browser/download/download_item_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +9 lines, -5 lines 0 comments Download
M content/browser/download/download_manager_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/download/mock_download_item_impl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -1 line 0 comments Download
M content/public/browser/download_item.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +11 lines, -6 lines 0 comments Download
M content/public/test/fake_download_item.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M content/public/test/fake_download_item.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M content/public/test/mock_download_item.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -1 line 0 comments Download
M tools/metrics/histograms/enums.xml View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 74 (43 generated)
MAD
As mentioned in the temporary title, this is not a complete CL to be reviewed, ...
3 years, 10 months ago (2017-02-03 20:07:59 UTC) #6
pastarmovj
I see Asanka is already in the cc list but I think he will do ...
3 years, 10 months ago (2017-02-06 07:45:00 UTC) #16
MAD
Updated the policy template descriptions to address comments, and also specified the subtleties of download ...
3 years, 10 months ago (2017-02-06 19:41:33 UTC) #18
pastarmovj
On 2017/02/06 19:41:33, MAD wrote: > Updated the policy template descriptions to address comments, and ...
3 years, 10 months ago (2017-02-07 06:52:32 UTC) #19
MAD
Patch 6 (as compared to patch 5) proposes an alternate solution using a more explicit ...
3 years, 10 months ago (2017-02-07 21:26:13 UTC) #22
asanka
Sorry about the delay. I'd suggest looking at a couple of options: * If we ...
3 years, 10 months ago (2017-02-09 03:35:49 UTC) #23
MAD
Excellent! Thanks... So patch set 6 is NOT what we want (it's the one adding ...
3 years, 10 months ago (2017-02-09 14:52:44 UTC) #24
asanka
On 2017/02/09 at 14:52:44, mad wrote: > Excellent! Thanks... > > So patch set 6 ...
3 years, 10 months ago (2017-02-09 19:24:46 UTC) #26
asanka
https://codereview.chromium.org/2674973003/diff/160001/chrome/browser/download/chrome_download_manager_delegate.cc File chrome/browser/download/chrome_download_manager_delegate.cc (right): https://codereview.chromium.org/2674973003/diff/160001/chrome/browser/download/chrome_download_manager_delegate.cc#newcode181 chrome/browser/download/chrome_download_manager_delegate.cc:181: // restricted_download_item is not null and danger_type is set ...
3 years, 10 months ago (2017-02-09 19:25:01 UTC) #27
MAD
Just realized I had not posted my answers to the recent comments as I uploaded ...
3 years, 10 months ago (2017-02-14 18:15:48 UTC) #28
asanka
On 2017/02/14 18:15:48, MAD wrote: > Just realized I had not posted my answers to ...
3 years, 8 months ago (2017-04-21 15:13:40 UTC) #29
MAD
Thanks! I'm on a temporary assignment to another team until we branch m60, so I'll ...
3 years, 8 months ago (2017-04-21 15:35:57 UTC) #30
MAD
OK, I finally got back to this CL and added code to benefit from the ...
3 years, 6 months ago (2017-06-02 20:00:58 UTC) #33
asanka
Cool. In the meantime, I moved off of downloads :-) I'll leave this in the ...
3 years, 6 months ago (2017-06-06 03:00:36 UTC) #42
MAD
No code changes yet, just answers and more questions. Thanks! BYE MAD https://codereview.chromium.org/2674973003/diff/260023/components/policy/resources/policy_templates.json File components/policy/resources/policy_templates.json ...
3 years, 6 months ago (2017-06-06 18:00:28 UTC) #43
asanka
https://codereview.chromium.org/2674973003/diff/260023/content/browser/download/download_item_impl.cc File content/browser/download/download_item_impl.cc (right): https://codereview.chromium.org/2674973003/diff/260023/content/browser/download/download_item_impl.cc#newcode845 content/browser/download/download_item_impl.cc:845: InterruptAndDiscardPartialState(reason); On 2017/06/06 18:00:28, MAD wrote: > On 2017/06/06 ...
3 years, 6 months ago (2017-06-06 18:34:18 UTC) #44
David Trainor- moved to gerrit
On 2017/06/06 18:34:18, asanka wrote: > https://codereview.chromium.org/2674973003/diff/260023/content/browser/download/download_item_impl.cc > File content/browser/download/download_item_impl.cc (right): > > https://codereview.chromium.org/2674973003/diff/260023/content/browser/download/download_item_impl.cc#newcode845 > ...
3 years, 6 months ago (2017-06-07 07:18:25 UTC) #45
MAD
No rush... Thanks! Le mer. 7 juin 2017 à 03:18, <dtrainor@chromium.org> a écrit : > ...
3 years, 6 months ago (2017-06-07 15:24:22 UTC) #46
MAD
Updated the policy names and description to match the code (I hadn't realize that I ...
3 years, 6 months ago (2017-06-12 17:38:16 UTC) #48
David Trainor- moved to gerrit
https://codereview.chromium.org/2674973003/diff/260023/content/browser/download/download_item_impl.cc File content/browser/download/download_item_impl.cc (right): https://codereview.chromium.org/2674973003/diff/260023/content/browser/download/download_item_impl.cc#newcode845 content/browser/download/download_item_impl.cc:845: InterruptAndDiscardPartialState(reason); On 2017/06/12 17:38:15, MAD wrote: > On 2017/06/06 ...
3 years, 6 months ago (2017-06-12 19:09:05 UTC) #49
MAD
Thanks! How about this now? BYE MAD... https://codereview.chromium.org/2674973003/diff/260023/content/browser/download/download_item_impl.cc File content/browser/download/download_item_impl.cc (right): https://codereview.chromium.org/2674973003/diff/260023/content/browser/download/download_item_impl.cc#newcode845 content/browser/download/download_item_impl.cc:845: InterruptAndDiscardPartialState(reason); On ...
3 years, 6 months ago (2017-06-12 19:45:14 UTC) #52
David Trainor- moved to gerrit
lgtm
3 years, 6 months ago (2017-06-12 21:02:29 UTC) #53
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/2674973003/360001
3 years, 6 months ago (2017-06-12 21:10:25 UTC) #55
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/461726)
3 years, 6 months ago (2017-06-12 21:23:25 UTC) #57
MAD
I'm still missing OWNERs LGTM for: chrome/browser/policy/configuration_policy_handler_list_factory.cc components/policy/resources/policy_templates.json pastarmovj@ ? TBR jochen@ ? chrome/browser/profiles/profile_impl.cc content/public/browser/download_item.h ...
3 years, 6 months ago (2017-06-13 15:16:26 UTC) #58
jochen (gone - plz use gerrit)
lgtm with comments https://codereview.chromium.org/2674973003/diff/380001/chrome/browser/download/chrome_download_manager_delegate.cc File chrome/browser/download/chrome_download_manager_delegate.cc (right): https://codereview.chromium.org/2674973003/diff/380001/chrome/browser/download/chrome_download_manager_delegate.cc#newcode911 chrome/browser/download/chrome_download_manager_delegate.cc:911: if (download_restriction == DownloadPrefs::DownloadRestriction::ALL_FILES) what about ...
3 years, 6 months ago (2017-06-14 08:16:50 UTC) #65
pastarmovj
policy LGTM with a few requests for clarifications in the description text. https://codereview.chromium.org/2674973003/diff/380001/components/policy/resources/policy_templates.json File components/policy/resources/policy_templates.json ...
3 years, 6 months ago (2017-06-14 08:48:35 UTC) #66
MAD
All done... Thanks! Will go through CQ, but if you disagree with how I applied ...
3 years, 6 months ago (2017-06-14 17:50:22 UTC) #67
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/2674973003/430001
3 years, 6 months ago (2017-06-14 17:51:09 UTC) #70
commit-bot: I haz the power
Committed patchset #22 (id:430001) as https://chromium.googlesource.com/chromium/src/+/4e9c44b9e4a05ba422bbe2f5d62b12d83071b94c
3 years, 6 months ago (2017-06-14 19:27:30 UTC) #73
pastarmovj
3 years, 6 months ago (2017-06-16 07:17:13 UTC) #74
Message was sent while issue was closed.
Thanks - the policy documentation looks great to me now! :) Still lgtm.

https://codereview.chromium.org/2674973003/diff/380001/components/policy/reso...
File components/policy/resources/policy_templates.json (right):

https://codereview.chromium.org/2674973003/diff/380001/components/policy/reso...
components/policy/resources/policy_templates.json:1765: But these restrictions
do not apply to the save / download of the currently displayed page, nor does it
apply to saving as PDF from the printing options.''',
On 2017/06/14 17:50:21, MAD wrote:
> On 2017/06/14 08:48:35, pastarmovj wrote:
> > Do we have a help center article about SafeBrowsing? It feels to me it will
be
> > good to include a link here for people to know what does the restrictions
> above
> > really mean.
> 
> There are other mentions of safe browsing within other policies (some policies
> being directly related to it). Should I add the link there too?

If you want to you can do that in another CL. But at least this policy now has
great comprehensive description! :)

Powered by Google App Engine
This is Rietveld 408576698