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

Unified Diff: chrome/browser/printing/printing_message_filter.cc

Issue 2527913002: Fix one more RenderFrame/RenderView ID mixup in printing code. (Closed)
Patch Set: put back PrintingMessageFilter::OnUpdatePrintSettings code Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview/print_preview_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/printing_message_filter.cc
diff --git a/chrome/browser/printing/printing_message_filter.cc b/chrome/browser/printing/printing_message_filter.cc
index 5423e0dd771f6751b3b70f59462c1b24b130f9b7..a4f2597779073a05f469dee5c38d2eb5dc0199ec 100644
--- a/chrome/browser/printing/printing_message_filter.cc
+++ b/chrome/browser/printing/printing_message_filter.cc
@@ -257,14 +257,12 @@ void PrintingMessageFilter::OnUpdatePrintSettings(
}
printer_query = queue_->PopPrinterQuery(document_cookie);
if (!printer_query.get()) {
- int host_id = render_process_id_;
- int routing_id = reply_msg->routing_id();
- if (!new_settings->GetInteger(printing::kPreviewInitiatorHostId,
- &host_id) ||
- !new_settings->GetInteger(printing::kPreviewInitiatorRoutingId,
- &routing_id)) {
+ int host_id;
+ int routing_id;
+ if (!new_settings->GetInteger(kPreviewInitiatorHostId, &host_id) ||
+ !new_settings->GetInteger(kPreviewInitiatorRoutingId, &routing_id)) {
host_id = content::ChildProcessHost::kInvalidUniqueID;
- routing_id = content::ChildProcessHost::kInvalidUniqueID;
+ routing_id = MSG_ROUTING_NONE;
}
printer_query = queue_->CreatePrinterQuery(host_id, routing_id);
}
@@ -286,11 +284,10 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
params.params.document_cookie = printer_query->cookie();
params.pages = PageRange::GetPages(printer_query->settings().ranges());
}
- PrintHostMsg_UpdatePrintSettings::WriteReplyParams(
- reply_msg,
- params,
- printer_query.get() &&
- (printer_query->last_status() == printing::PrintingContext::CANCEL));
+ bool canceled = printer_query.get() &&
+ (printer_query->last_status() == PrintingContext::CANCEL);
+ PrintHostMsg_UpdatePrintSettings::WriteReplyParams(reply_msg, params,
+ canceled);
Send(reply_msg);
// If user hasn't cancelled.
if (printer_query.get()) {
« no previous file with comments | « no previous file | chrome/browser/ui/webui/print_preview/print_preview_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698