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

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

Issue 7693017: Removed use of memset with PrintMsg_Print_Params struct. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes as per Kausalya's comments Created 9 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 | « no previous file | chrome/chrome_common.gypi » ('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 c6c13d166a59111bb65840f456bd8431458e4cb5..c9593d14b498a941c811fdd9b8058f36dbfb7e01 100644
--- a/chrome/browser/printing/printing_message_filter.cc
+++ b/chrome/browser/printing/printing_message_filter.cc
@@ -210,7 +210,7 @@ void PrintingMessageFilter::OnGetDefaultPrintSettingsReply(
PrintMsg_Print_Params params;
if (!printer_query.get() ||
printer_query->last_status() != printing::PrintingContext::OK) {
- memset(&params, 0, sizeof(params));
+ params.Reset();
} else {
RenderParamsFromPrintSettings(printer_query->settings(), &params);
params.document_cookie = printer_query->cookie();
@@ -262,7 +262,7 @@ void PrintingMessageFilter::OnScriptedPrintReply(
PrintMsg_PrintPages_Params params;
if (printer_query->last_status() != printing::PrintingContext::OK ||
!printer_query->settings().dpi()) {
- memset(&params, 0, sizeof(params));
+ params.Reset();
} else {
RenderParamsFromPrintSettings(printer_query->settings(), &params.params);
params.params.document_cookie = printer_query->cookie();
@@ -298,7 +298,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply(
IPC::Message* reply_msg) {
PrintMsg_PrintPages_Params params;
if (printer_query->last_status() != printing::PrintingContext::OK) {
- memset(&params, 0, sizeof(params));
+ params.Reset();
} else {
RenderParamsFromPrintSettings(printer_query->settings(), &params.params);
params.params.document_cookie = printer_query->cookie();
« no previous file with comments | « no previous file | chrome/chrome_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698