summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 00:10:02 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-26 00:10:02 +0000
commit0c22345d5e500ad60e51b7a4c4da29fe3cf6ff64 (patch)
treecc962f6617dc4e46ef2524a4647f3b6b9c22eb5d /chrome/renderer
parentfffb017188ea858bd4f3848b2685454998cf77f1 (diff)
downloadchromium_src-0c22345d5e500ad60e51b7a4c4da29fe3cf6ff64.zip
chromium_src-0c22345d5e500ad60e51b7a4c4da29fe3cf6ff64.tar.gz
chromium_src-0c22345d5e500ad60e51b7a4c4da29fe3cf6ff64.tar.bz2
Add a comment in PrintWebViewHelper::Print().
The use of DidFinishPrinting(user_cancelled_print) at the end of PrintWebViewHelper::Print() is confusing without a comment. TEST=none BUG=none Review URL: http://codereview.chromium.org/173368 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24376 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/print_web_view_helper_win.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/renderer/print_web_view_helper_win.cc b/chrome/renderer/print_web_view_helper_win.cc
index fe7a8db..625a66d 100644
--- a/chrome/renderer/print_web_view_helper_win.cc
+++ b/chrome/renderer/print_web_view_helper_win.cc
@@ -139,6 +139,13 @@ void PrintWebViewHelper::Print(WebFrame* frame, bool script_initiated) {
++user_cancelled_scripted_print_count_;
last_cancelled_script_print_ = base::Time::Now();
}
+ // When |user_cancelled_print| is true, we treat it as success so that
+ // DidFinishPrinting() won't show any error alert.
+ // If |user_cancelled_print| is false and we reach here, there must be
+ // something wrong and hence is not success, DidFinishPrinting() should show
+ // an error alert.
+ // In both cases, we have to call DidFinishPrinting() here to release
+ // printing resources, since we do need them anymore.
DidFinishPrinting(user_cancelled_print);
}