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

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

Issue 3418034: Printing: Push checking of |context| one level lower, as the different (Closed)
Patch Set: One more. Created 10 years, 3 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 | printing/printing_context_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/printing/print_job_worker.cc
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
index cac0abfbdf719891790c81fb5840f8784ab5cc77..20e51ea328130b5cd9beb9585a0478def7ac38d7 100644
--- a/chrome/browser/printing/print_job_worker.cc
+++ b/chrome/browser/printing/print_job_worker.cc
@@ -137,9 +137,7 @@ void PrintJobWorker::StartPrinting(PrintedDocument* new_document) {
DCHECK_EQ(document_, new_document);
DCHECK(document_.get());
DCHECK(new_document->settings().Equals(printing_context_.settings()));
-#if !defined(OS_MACOSX)
- DCHECK(printing_context_.context());
-#endif
+
if (!document_.get() || page_number_ != PageNumber::npos() ||
document_ != new_document) {
return;
@@ -166,9 +164,7 @@ void PrintJobWorker::OnDocumentChanged(PrintedDocument* new_document) {
DCHECK_EQ(page_number_, PageNumber::npos());
DCHECK(!new_document ||
new_document->settings().Equals(printing_context_.settings()));
-#if !defined(OS_MACOSX)
- DCHECK(printing_context_.context());
-#endif
+
if (page_number_ != PageNumber::npos())
return;
@@ -182,11 +178,6 @@ void PrintJobWorker::OnNewPage() {
}
// message_loop() could return NULL when the print job is cancelled.
DCHECK_EQ(message_loop(), MessageLoop::current());
-#if !defined(OS_MACOSX)
- DCHECK(printing_context_.context());
- if (!printing_context_.context())
- return;
-#endif
if (page_number_ == PageNumber::npos()) {
// Find first page to print.
@@ -239,9 +230,6 @@ void PrintJobWorker::OnDocumentDone() {
DCHECK_EQ(message_loop(), MessageLoop::current());
DCHECK_EQ(page_number_, PageNumber::npos());
DCHECK(document_.get());
-#if !defined(OS_MACOSX)
- DCHECK(printing_context_.context());
-#endif
if (printing_context_.DocumentDone() != PrintingContext::OK) {
OnFailure();
« no previous file with comments | « no previous file | printing/printing_context_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698