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

Unified Diff: printing/printing_context_win.cc

Issue 299363002: Cleanup: Get rid of unneeded base::UTF16ToWide() conversions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style Created 6 years, 7 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 | « components/breakpad/app/breakpad_win.cc ('k') | remoting/base/breakpad_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/printing_context_win.cc
diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc
index 7983d26bb48135b238af22ba03f84ca496aa6399..f68482d3a61016d2cd7f4a62bba3d323e287ca0c 100644
--- a/printing/printing_context_win.cc
+++ b/printing/printing_context_win.cc
@@ -322,7 +322,7 @@ PrintingContext::Result PrintingContextWin::UpdatePrinterSettings(
{
DEVMODE* dev_mode = scoped_dev_mode.get();
dev_mode->dmCopies = std::max(settings_.copies(), 1);
- if (dev_mode->dmCopies > 1) { // do not change unless multiple copies
+ if (dev_mode->dmCopies > 1) { // do not change unless multiple copies
dev_mode->dmFields |= DM_COPIES;
dev_mode->dmCollate = settings_.collate() ? DMCOLLATE_TRUE :
DMCOLLATE_FALSE;
@@ -405,8 +405,7 @@ PrintingContext::Result PrintingContextWin::NewDocument(
DCHECK(SimplifyDocumentTitle(document_name) == document_name);
DOCINFO di = { sizeof(DOCINFO) };
- const std::wstring& document_name_wide = base::UTF16ToWide(document_name);
- di.lpszDocName = document_name_wide.c_str();
+ di.lpszDocName = document_name.c_str();
// Is there a debug dump directory specified? If so, force to print to a file.
base::FilePath debug_dump_path = PrintedDocument::debug_dump_path();
@@ -418,7 +417,7 @@ PrintingContext::Result PrintingContextWin::NewDocument(
filename += L"_";
filename += base::TimeFormatTimeOfDay(now);
filename += L"_";
- filename += base::UTF16ToWide(document_name);
+ filename += document_name;
filename += L"_";
filename += L"buffer.prn";
file_util::ReplaceIllegalCharactersInPath(&filename, '_');
« no previous file with comments | « components/breakpad/app/breakpad_win.cc ('k') | remoting/base/breakpad_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698