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

Issue 10890054: Reign in print throttling. (Closed)

Created:
8 years, 3 months ago by Scott Byer
Modified:
8 years, 3 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, jam, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Reign in print throttling. Don't throttle the frequency of calls to window.print() from JavaScript if the action was user initiated (e.g., clicking on a button), if print preview is active (which is tab-modal, so the user can easily stop any attempted DOS), or if a flag on the command line is given (say, you want to run chromium for a point-of-sale system). BUG=50186 TEST=Go to a web page with a print button - should be able to click on the button and cancel the print quickly without ever seeing the dreaded warning from 50186 in the console. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=157612

Patch Set 1 #

Patch Set 2 : Rebase to start review #

Total comments: 4

Patch Set 3 : Add comment sentence on new parameter #

Patch Set 4 : Rebase only #

Unified diffs Side-by-side diffs Delta from patch set Stats (+119 lines, -10 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/chrome_switches.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/renderer/print_web_view_helper.h View 1 2 3 chunks +7 lines, -3 lines 0 comments Download
M chrome/renderer/print_web_view_helper.cc View 1 2 3 4 chunks +19 lines, -4 lines 0 comments Download
M chrome/renderer/print_web_view_helper_browsertest.cc View 4 chunks +84 lines, -1 line 0 comments Download
M content/public/renderer/render_view_observer.h View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 12 (0 generated)
Scott Byer
An alternative would be to strip out the throttling entirely, but that could leave users ...
8 years, 3 months ago (2012-08-30 17:59:09 UTC) #1
Jói
LGTM with a nit http://codereview.chromium.org/10890054/diff/6001/chrome/renderer/print_web_view_helper.h File chrome/renderer/print_web_view_helper.h (right): http://codereview.chromium.org/10890054/diff/6001/chrome/renderer/print_web_view_helper.h#newcode336 chrome/renderer/print_web_view_helper.h:336: bool user_initiated); On a method ...
8 years, 3 months ago (2012-08-30 18:05:22 UTC) #2
Lei Zhang
http://codereview.chromium.org/10890054/diff/6001/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/10890054/diff/6001/chrome/renderer/print_web_view_helper.cc#newcode740 chrome/renderer/print_web_view_helper.cc:740: // If preview is enabled, then the print dialog ...
8 years, 3 months ago (2012-08-30 18:15:31 UTC) #3
Scott Byer
http://codereview.chromium.org/10890054/diff/6001/chrome/renderer/print_web_view_helper.cc File chrome/renderer/print_web_view_helper.cc (right): http://codereview.chromium.org/10890054/diff/6001/chrome/renderer/print_web_view_helper.cc#newcode740 chrome/renderer/print_web_view_helper.cc:740: // If preview is enabled, then the print dialog ...
8 years, 3 months ago (2012-08-30 18:22:12 UTC) #4
Lei Zhang
Sounds good. LGTM
8 years, 3 months ago (2012-08-30 18:34:46 UTC) #5
Scott Byer
jamesr, ping for content/renderer change. http://codereview.chromium.org/10890054/diff/6001/chrome/renderer/print_web_view_helper.h File chrome/renderer/print_web_view_helper.h (right): http://codereview.chromium.org/10890054/diff/6001/chrome/renderer/print_web_view_helper.h#newcode336 chrome/renderer/print_web_view_helper.h:336: bool user_initiated); On 2012/08/30 ...
8 years, 3 months ago (2012-08-30 23:32:24 UTC) #6
jamesr
+cc Necker to check the user gesture / throttling logic changes.
8 years, 3 months ago (2012-08-31 23:20:27 UTC) #7
Scott Byer
Neckar, friendly ping?
8 years, 3 months ago (2012-09-19 17:51:47 UTC) #8
Cris Neckar
On 2012/09/19 17:51:47, Scott Byer wrote: > Neckar, friendly ping? Sorry about that, missed the ...
8 years, 3 months ago (2012-09-19 17:59:41 UTC) #9
jamesr
Thanks for looking, Cris. owners stamp LGTM on content/renderer
8 years, 3 months ago (2012-09-19 18:12:53 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scottbyer@chromium.org/10890054/19001
8 years, 3 months ago (2012-09-19 19:02:33 UTC) #11
commit-bot: I haz the power
8 years, 3 months ago (2012-09-19 21:36:13 UTC) #12
Change committed as 157612

Powered by Google App Engine
This is Rietveld 408576698