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

Issue 10692110: screenshot disabling policy (Closed)

Created:
8 years, 5 months ago by qfel
Modified:
8 years, 4 months ago
CC:
chromium-reviews, mihaip-chromium-reviews_chromium.org, sadrul, Nirnimesh, ben+watch_chromium.org, Aaron Boodman, anantha, dyu1, dennis_jeffrey, Joao da Silva
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Screenshot disabling policy (work in progress) Add group policy to disable taking screenshots: * by keyboard shortcut (using local state) * when reporting feedback (using local state) * by extension API (using user prefs) How to test: - Press Ctrl+F5 (or the corresponding key combination on chromebook) to take a screenshot. This should flash a screen and create a screenshot in your files, if the policy is not enabled. - Install http://code.google.com/chrome/extensions/examples/api/tabs/screenshot.zip extension to test extension APIs. This allows to take tab screenshots of code.google.com. - In Chrome menu, use Tools -> Report an Issue... to go to issue screen, which should contain a screenshot (if the policy is not enabled) Implementation: - Changed browser::GrabWindowSnapshot and ScreenshotTaker::GrabWindowSnapshot to block screenshots triggered by accelerators and feedback form - CaptureVisibleTabFunction::RunImpl to disable tab screenshots made by extension API BUG=chromium-os:24747 TEST= Disable screenshots through policy, check I screenshots can created/viewed TBR= zmo@chromium.org, jbates@chromium.org Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=148963

Patch Set 1 #

Total comments: 28

Patch Set 2 : Addressed comments #

Total comments: 14

Patch Set 3 : Addressed comments (2), hooking into GrabWindowSnapshot instead of ChromeShellDelegate, rebased on … #

Total comments: 24

Patch Set 4 : Addressed comments (3), made policy available on all platforms #

Patch Set 5 : Broken screenshot not visible on feedback page when screenshots are disabled #

Total comments: 12

Patch Set 6 : Addressed comments (4) #

Total comments: 6

Patch Set 7 : Addressed comments (5) #

Total comments: 6

Patch Set 8 : Addressed comments (6) #

Patch Set 9 : Rebased #

Patch Set 10 : Rebased #

Patch Set 11 : Fixed Android and Mac builds #

Unified diffs Side-by-side diffs Delta from patch set Stats (+168 lines, -55 lines) Patch
M chrome/app/policy/policy_templates.json View 1 2 3 4 5 6 7 8 9 2 chunks +17 lines, -1 line 0 comments Download
M chrome/browser/extensions/api/tabs/tabs.h View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs.cc View 1 2 3 4 5 6 7 8 9 3 chunks +12 lines, -0 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_constants.h View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/extensions/api/tabs/tabs_constants.cc View 1 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/policy/configuration_policy_handler_list.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/resources/feedback.html View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/feedback.js View 1 2 3 4 5 6 7 4 chunks +28 lines, -25 lines 0 comments Download
M chrome/browser/ui/ash/screenshot_taker.cc View 1 2 3 4 5 6 7 8 9 3 chunks +15 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/feedback_ui.cc View 1 2 3 4 5 6 7 8 9 5 chunks +15 lines, -13 lines 0 comments Download
M chrome/browser/ui/window_snapshot/window_snapshot.h View 1 2 3 4 5 6 7 8 9 2 chunks +8 lines, -3 lines 0 comments Download
A chrome/browser/ui/window_snapshot/window_snapshot.cc View 1 2 3 4 5 6 7 8 9 1 chunk +32 lines, -0 lines 0 comments Download
M chrome/browser/ui/window_snapshot/window_snapshot_aura.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/window_snapshot/window_snapshot_gtk.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/window_snapshot/window_snapshot_mac.mm View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/window_snapshot/window_snapshot_mac_unittest.mm View 1 2 3 4 5 6 7 8 9 10 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/browser/ui/window_snapshot/window_snapshot_win.cc View 1 2 3 4 5 6 7 8 9 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 9 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 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/test/functional/policy_test_cases.py View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
qfel
8 years, 5 months ago (2012-07-06 14:43:12 UTC) #1
Mattias Nissler (ping if slow)
http://codereview.chromium.org/10692110/diff/1/chrome/app/policy/policy_templates.json File chrome/app/policy/policy_templates.json (right): http://codereview.chromium.org/10692110/diff/1/chrome/app/policy/policy_templates.json#newcode134 chrome/app/policy/policy_templates.json:134: 'supported_on': ['chrome_os:0.11-'], # TODO: chose correct version chrome_os.22- http://codereview.chromium.org/10692110/diff/1/chrome/app/policy/policy_templates.json#newcode141 ...
8 years, 5 months ago (2012-07-06 15:15:51 UTC) #2
qfel
http://codereview.chromium.org/10692110/diff/1/chrome/app/policy/policy_templates.json File chrome/app/policy/policy_templates.json (right): http://codereview.chromium.org/10692110/diff/1/chrome/app/policy/policy_templates.json#newcode134 chrome/app/policy/policy_templates.json:134: 'supported_on': ['chrome_os:0.11-'], # TODO: chose correct version Done http://codereview.chromium.org/10692110/diff/1/chrome/app/policy/policy_templates.json#newcode141 ...
8 years, 5 months ago (2012-07-06 17:00:39 UTC) #3
Mattias Nissler (ping if slow)
A couple more comments. Can you also fill in the CL description please? Adding sky ...
8 years, 5 months ago (2012-07-09 09:30:12 UTC) #4
qfel
Issue reporting screen still needs some tweaks when the policy is enabled, otherwise it is ...
8 years, 5 months ago (2012-07-11 12:34:49 UTC) #5
Mattias Nissler (ping if slow)
http://codereview.chromium.org/10692110/diff/11015/chrome/browser/extensions/api/tabs/tabs.cc File chrome/browser/extensions/api/tabs/tabs.cc (right): http://codereview.chromium.org/10692110/diff/11015/chrome/browser/extensions/api/tabs/tabs.cc#newcode22 chrome/browser/extensions/api/tabs/tabs.cc:22: #include "chrome/browser/browser_process.h" still required? http://codereview.chromium.org/10692110/diff/11015/chrome/browser/ui/views/ash/screenshot_taker.cc File chrome/browser/ui/views/ash/screenshot_taker.cc (right): http://codereview.chromium.org/10692110/diff/11015/chrome/browser/ui/views/ash/screenshot_taker.cc#newcode121 ...
8 years, 5 months ago (2012-07-12 08:59:31 UTC) #6
Joao da Silva
http://codereview.chromium.org/10692110/diff/11015/chrome/chrome_browser.gypi File chrome/chrome_browser.gypi (right): http://codereview.chromium.org/10692110/diff/11015/chrome/chrome_browser.gypi#newcode4180 chrome/chrome_browser.gypi:4180: 'browser/ui/window_snapshot/window_snapshot.cc', .cc before .h
8 years, 5 months ago (2012-07-12 09:10:34 UTC) #7
qfel
http://codereview.chromium.org/10692110/diff/11015/chrome/browser/extensions/api/tabs/tabs.cc File chrome/browser/extensions/api/tabs/tabs.cc (right): http://codereview.chromium.org/10692110/diff/11015/chrome/browser/extensions/api/tabs/tabs.cc#newcode22 chrome/browser/extensions/api/tabs/tabs.cc:22: #include "chrome/browser/browser_process.h" On 2012/07/12 08:59:32, Mattias Nissler wrote: > ...
8 years, 5 months ago (2012-07-12 14:48:06 UTC) #8
qfel
Rahul: please look over feedback* files. I made screenshot part of the report hidden by ...
8 years, 5 months ago (2012-07-13 13:28:24 UTC) #9
Mattias Nissler (ping if slow)
http://codereview.chromium.org/10692110/diff/2005/chrome/browser/resources/feedback.html File chrome/browser/resources/feedback.html (right): http://codereview.chromium.org/10692110/diff/2005/chrome/browser/resources/feedback.html#newcode70 chrome/browser/resources/feedback.html:70: <div id="saved-screenshots" class="thumbnail-list" hidden></div> hide? http://codereview.chromium.org/10692110/diff/2005/chrome/browser/resources/feedback.html#newcode72 chrome/browser/resources/feedback.html:72: <div id="current-screenshots" ...
8 years, 5 months ago (2012-07-13 15:23:42 UTC) #10
rkc
Other than Mattias's comments, feedback LGTM. On 2012/07/13 15:23:42, Mattias Nissler wrote: > http://codereview.chromium.org/10692110/diff/2005/chrome/browser/resources/feedback.html > ...
8 years, 5 months ago (2012-07-13 19:49:00 UTC) #11
qfel
Hopefully I got the formatting right.. I think there was no need to modify additional ...
8 years, 5 months ago (2012-07-16 09:11:12 UTC) #12
Mattias Nissler (ping if slow)
LGTM, now you'll have to get full OWNERS coverage, in particular for ui and extensions ...
8 years, 5 months ago (2012-07-16 10:47:38 UTC) #13
qfel
Kindly asking owners to review: skerner - chrome/browser/extensions (CaptureVisibleTabFunction altered to check if capturing screenshots ...
8 years, 5 months ago (2012-07-16 11:56:01 UTC) #14
sky
http://codereview.chromium.org/10692110/diff/16001/chrome/browser/ui/window_snapshot/window_snapshot.h File chrome/browser/ui/window_snapshot/window_snapshot.h (right): http://codereview.chromium.org/10692110/diff/16001/chrome/browser/ui/window_snapshot/window_snapshot.h#newcode25 chrome/browser/ui/window_snapshot/window_snapshot.h:25: bool GrabWindowSnapshotIfPermitted( Lead this named GrabWindowSnapshot and name the ...
8 years, 5 months ago (2012-07-16 14:01:53 UTC) #15
Sam Kerner (Chrome)
Added aa to review the change to the API of chrome.tabs.captureVisibleTab(). I have been away ...
8 years, 5 months ago (2012-07-16 14:50:02 UTC) #16
Evan Stade
http://codereview.chromium.org/10692110/diff/16001/chrome/browser/ui/webui/feedback_ui.cc File chrome/browser/ui/webui/feedback_ui.cc (right): http://codereview.chromium.org/10692110/diff/16001/chrome/browser/ui/webui/feedback_ui.cc#newcode445 chrome/browser/ui/webui/feedback_ui.cc:445: ListValue dialog_defaults; this would be a lot better as ...
8 years, 5 months ago (2012-07-16 18:39:45 UTC) #17
Nirnimesh
chrome/test/functional LGTM
8 years, 5 months ago (2012-07-16 18:43:13 UTC) #18
qfel
http://codereview.chromium.org/10692110/diff/16001/chrome/browser/ui/webui/feedback_ui.cc File chrome/browser/ui/webui/feedback_ui.cc (right): http://codereview.chromium.org/10692110/diff/16001/chrome/browser/ui/webui/feedback_ui.cc#newcode445 chrome/browser/ui/webui/feedback_ui.cc:445: ListValue dialog_defaults; On 2012/07/16 18:39:50, Evan Stade wrote: > ...
8 years, 5 months ago (2012-07-17 13:33:43 UTC) #19
Evan Stade
webui and resources LGTM with nits http://codereview.chromium.org/10692110/diff/22006/chrome/browser/resources/feedback.js File chrome/browser/resources/feedback.js (right): http://codereview.chromium.org/10692110/diff/22006/chrome/browser/resources/feedback.js#newcode282 chrome/browser/resources/feedback.js:282: $('page-url-text').value = defaults['current_url']; ...
8 years, 5 months ago (2012-07-17 18:27:30 UTC) #20
sky
http://codereview.chromium.org/10692110/diff/22006/chrome/browser/ui/views/ash/screenshot_taker.cc File chrome/browser/ui/views/ash/screenshot_taker.cc (right): http://codereview.chromium.org/10692110/diff/22006/chrome/browser/ui/views/ash/screenshot_taker.cc#newcode121 chrome/browser/ui/views/ash/screenshot_taker.cc:121: return false; This is going to result in a ...
8 years, 5 months ago (2012-07-17 22:05:57 UTC) #21
qfel
http://codereview.chromium.org/10692110/diff/22006/chrome/browser/resources/feedback.js File chrome/browser/resources/feedback.js (right): http://codereview.chromium.org/10692110/diff/22006/chrome/browser/resources/feedback.js#newcode282 chrome/browser/resources/feedback.js:282: $('page-url-text').value = defaults['current_url']; On 2012/07/17 18:27:30, Evan Stade wrote: ...
8 years, 5 months ago (2012-07-18 09:24:26 UTC) #22
sky
LGTM
8 years, 5 months ago (2012-07-18 15:17:27 UTC) #23
qfel
On 2012/07/16 14:50:02, Sam Kerner (Chrome) wrote: > Added aa to review the change to ...
8 years, 5 months ago (2012-07-19 10:17:40 UTC) #24
skerner
On Thu, Jul 19, 2012 at 6:17 AM, <qfel@google.com> wrote: > On 2012/07/16 14:50:02, Sam ...
8 years, 5 months ago (2012-07-19 15:30:37 UTC) #25
Matt Perry
This seems OK to me. LGTM
8 years, 5 months ago (2012-07-19 23:05:49 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/qfel@google.com/10692110/41003
8 years, 4 months ago (2012-07-30 15:09:23 UTC) #27
commit-bot: I haz the power
Change committed as 148963
8 years, 4 months ago (2012-07-30 17:09:35 UTC) #28
grt (UTC plus 2)
8 years, 4 months ago (2012-07-31 09:54:57 UTC) #29
On 2012/07/30 17:09:35, I haz the power (commit-bot) wrote:
> Change committed as 148963

This change has introduced a regression in the Chrome Frame tests.  Please see
http://crbug.com/139694#c11 and fix accordingly.  Thanks.

Powered by Google App Engine
This is Rietveld 408576698