| Index: components/printing/renderer/print_web_view_helper.cc
|
| diff --git a/components/printing/renderer/print_web_view_helper.cc b/components/printing/renderer/print_web_view_helper.cc
|
| index 740f83e57b433244b1b7a450945b67becfdd0d53..24a13e28d54df6cfd50e713abee5acea450b36a4 100644
|
| --- a/components/printing/renderer/print_web_view_helper.cc
|
| +++ b/components/printing/renderer/print_web_view_helper.cc
|
| @@ -1184,9 +1184,10 @@ void PrintWebViewHelper::OnPrintPreview(const base::DictionaryValue& settings) {
|
| print_preview_context_.source_node(), settings)) {
|
| if (print_preview_context_.last_error() != PREVIEW_ERROR_BAD_SETTING) {
|
| Send(new PrintHostMsg_PrintPreviewInvalidPrinterSettings(
|
| - routing_id(), print_pages_params_
|
| - ? print_pages_params_->params.document_cookie
|
| - : 0));
|
| + routing_id(),
|
| + print_pages_params_ ? print_pages_params_->params.document_cookie : 0,
|
| + print_pages_params_ ? print_pages_params_->params.preview_request_id
|
| + : -1));
|
| notify_browser_of_print_failure_ = false; // Already sent.
|
| }
|
| DidFinishPrinting(FAIL_PREVIEW);
|
| @@ -1572,9 +1573,13 @@ void PrintWebViewHelper::DidFinishPrinting(PrintingResult result) {
|
| case FAIL_PREVIEW:
|
| int cookie =
|
| print_pages_params_ ? print_pages_params_->params.document_cookie : 0;
|
| + int request_id = print_pages_params_
|
| + ? print_pages_params_->params.preview_request_id
|
| + : 0;
|
| if (notify_browser_of_print_failure_) {
|
| LOG(ERROR) << "CreatePreviewDocument failed";
|
| - Send(new PrintHostMsg_PrintPreviewFailed(routing_id(), cookie));
|
| + Send(new PrintHostMsg_PrintPreviewFailed(routing_id(), cookie,
|
| + request_id));
|
| } else {
|
| Send(new PrintHostMsg_PrintPreviewCancelled(routing_id(), cookie));
|
| }
|
|
|