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

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: 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
« printing/printed_document.cc ('K') | « 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()
Lei Zhang 2013/05/06 04:05:55 How about this? DCHECK(!base::MessageLoop::curren
xhwang 2013/05/06 16:07:20 Done.
482 !MessageLoop::current()->NestableTasksAllowed()); 482 ? true
483 : !base::MessageLoop::current()->NestableTasksAllowed());
483 484
484 // Begin a print job by calling the StartDoc function. 485 // Begin a print job by calling the StartDoc function.
485 // NOTE: StartDoc() starts a message loop. That causes a lot of problems with 486 // NOTE: StartDoc() starts a message loop. That causes a lot of problems with
486 // IPC. Make sure recursive task processing is disabled. 487 // IPC. Make sure recursive task processing is disabled.
487 if (StartDoc(context_, &di) <= 0) 488 if (StartDoc(context_, &di) <= 0)
488 return OnError(); 489 return OnError();
489 490
490 return OK; 491 return OK;
491 } 492 }
492 493
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 754
754 if (dialog_options.hDevMode != NULL) 755 if (dialog_options.hDevMode != NULL)
755 GlobalFree(dialog_options.hDevMode); 756 GlobalFree(dialog_options.hDevMode);
756 if (dialog_options.hDevNames != NULL) 757 if (dialog_options.hDevNames != NULL)
757 GlobalFree(dialog_options.hDevNames); 758 GlobalFree(dialog_options.hDevNames);
758 759
759 return context_ ? OK : FAILED; 760 return context_ ? OK : FAILED;
760 } 761 }
761 762
762 } // namespace printing 763 } // namespace printing
OLDNEW
« printing/printed_document.cc ('K') | « printing/printed_document.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698