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

Side by Side Diff: printing/printing_context_win.cc

Issue 14113054: printing: Use base::MessageLoop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « printing/printed_document.cc ('k') | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_win.h" 5 #include "printing/printing_context_win.h"
6 6
7 #include <winspool.h> 7 #include <winspool.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 filename += L"_"; 471 filename += L"_";
472 filename += UTF16ToWide(document_name); 472 filename += UTF16ToWide(document_name);
473 filename += L"_"; 473 filename += L"_";
474 filename += L"buffer.prn"; 474 filename += L"buffer.prn";
475 file_util::ReplaceIllegalCharactersInPath(&filename, '_'); 475 file_util::ReplaceIllegalCharactersInPath(&filename, '_');
476 debug_dump_path.Append(filename); 476 debug_dump_path.Append(filename);
477 di.lpszOutput = debug_dump_path.value().c_str(); 477 di.lpszOutput = debug_dump_path.value().c_str();
478 } 478 }
479 479
480 // No message loop running in unit tests. 480 // No message loop running in unit tests.
481 DCHECK(!MessageLoop::current() ? true : 481 DCHECK(!base::MessageLoop::current() ||
482 !MessageLoop::current()->NestableTasksAllowed()); 482 !base::MessageLoop::current()->NestableTasksAllowed());
483 483
484 // Begin a print job by calling the StartDoc function. 484 // Begin a print job by calling the StartDoc function.
485 // NOTE: StartDoc() starts a message loop. That causes a lot of problems with 485 // NOTE: StartDoc() starts a message loop. That causes a lot of problems with
486 // IPC. Make sure recursive task processing is disabled. 486 // IPC. Make sure recursive task processing is disabled.
487 if (StartDoc(context_, &di) <= 0) 487 if (StartDoc(context_, &di) <= 0)
488 return OnError(); 488 return OnError();
489 489
490 return OK; 490 return OK;
491 } 491 }
492 492
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 753
754 if (dialog_options.hDevMode != NULL) 754 if (dialog_options.hDevMode != NULL)
755 GlobalFree(dialog_options.hDevMode); 755 GlobalFree(dialog_options.hDevMode);
756 if (dialog_options.hDevNames != NULL) 756 if (dialog_options.hDevNames != NULL)
757 GlobalFree(dialog_options.hDevNames); 757 GlobalFree(dialog_options.hDevNames);
758 758
759 return context_ ? OK : FAILED; 759 return context_ ? OK : FAILED;
760 } 760 }
761 761
762 } // namespace printing 762 } // namespace printing
OLDNEW
« no previous file with comments | « printing/printed_document.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698