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

Side by Side Diff: printing/printing_context_win.cc

Issue 271056: Do some cleanup of file path name handling. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « printing/printed_document.cc ('k') | webkit/glue/weburlloader_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "printing/printing_context.h" 5 #include "printing/printing_context.h"
6 6
7 #include <winspool.h> 7 #include <winspool.h>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/i18n/file_util_icu.h" 10 #include "base/i18n/file_util_icu.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 // Create a filename. 277 // Create a filename.
278 std::wstring filename; 278 std::wstring filename;
279 Time now(Time::Now()); 279 Time now(Time::Now());
280 filename = base::TimeFormatShortDateNumeric(now); 280 filename = base::TimeFormatShortDateNumeric(now);
281 filename += L"_"; 281 filename += L"_";
282 filename += base::TimeFormatTimeOfDay(now); 282 filename += base::TimeFormatTimeOfDay(now);
283 filename += L"_"; 283 filename += L"_";
284 filename += document_name; 284 filename += document_name;
285 filename += L"_"; 285 filename += L"_";
286 filename += L"buffer.prn"; 286 filename += L"buffer.prn";
287 file_util::ReplaceIllegalCharacters(&filename, '_'); 287 file_util::ReplaceIllegalCharactersInPath(&filename, '_');
288 file_util::AppendToPath(&debug_dump_path, filename); 288 file_util::AppendToPath(&debug_dump_path, filename);
289 di.lpszOutput = debug_dump_path.c_str(); 289 di.lpszOutput = debug_dump_path.c_str();
290 } 290 }
291 291
292 // No message loop running in unit tests. 292 // No message loop running in unit tests.
293 DCHECK(!MessageLoop::current() ? true : 293 DCHECK(!MessageLoop::current() ? true :
294 !MessageLoop::current()->NestableTasksAllowed()); 294 !MessageLoop::current()->NestableTasksAllowed());
295 295
296 // Begin a print job by calling the StartDoc function. 296 // Begin a print job by calling the StartDoc function.
297 // NOTE: StartDoc() starts a message loop. That causes a lot of problems with 297 // NOTE: StartDoc() starts a message loop. That causes a lot of problems with
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 602
603 if (dialog_options.hDevMode != NULL) 603 if (dialog_options.hDevMode != NULL)
604 GlobalFree(dialog_options.hDevMode); 604 GlobalFree(dialog_options.hDevMode);
605 if (dialog_options.hDevNames != NULL) 605 if (dialog_options.hDevNames != NULL)
606 GlobalFree(dialog_options.hDevNames); 606 GlobalFree(dialog_options.hDevNames);
607 607
608 return context_ ? OK : FAILED; 608 return context_ ? OK : FAILED;
609 } 609 }
610 610
611 } // namespace printing 611 } // namespace printing
OLDNEW
« no previous file with comments | « printing/printed_document.cc ('k') | webkit/glue/weburlloader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698