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

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

Issue 488913002: Use scoped_ptr to pass settings in PrintJobWorker and PrinterQuery. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tue Aug 19 19:59:20 PDT 2014 Created 6 years, 4 months 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 | « chrome/browser/printing/printer_query.cc ('k') | no next file » | 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 485cff692b27bdad64eb978716563fd6ff49617a..163114bf93954f8fa294fdf1b7c886206581cc91 100644
--- a/chrome/browser/printing/printing_message_filter.cc
+++ b/chrome/browser/printing/printing_message_filter.cc
@@ -427,6 +427,8 @@ void PrintingMessageFilter::UpdateFileDescriptor(int render_view_id, int fd) {
void PrintingMessageFilter::OnUpdatePrintSettings(
int document_cookie, const base::DictionaryValue& job_settings,
IPC::Message* reply_msg) {
+ scoped_ptr<base::DictionaryValue> new_settings(job_settings.DeepCopy());
+
scoped_refptr<printing::PrinterQuery> printer_query;
if (!profile_io_data_->printing_enabled()->GetValue()) {
// Reply with NULL query.
@@ -437,7 +439,7 @@ void PrintingMessageFilter::OnUpdatePrintSettings(
if (!printer_query)
printer_query = queue_->CreatePrinterQuery();
printer_query->SetSettings(
- job_settings,
+ new_settings.Pass(),
base::Bind(&PrintingMessageFilter::OnUpdatePrintSettingsReply, this,
printer_query, reply_msg));
}
« no previous file with comments | « chrome/browser/printing/printer_query.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698