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 12473513de214d03c18a1a1293058cc48a2001b9..5e3c59ccc40ccb0a95f73a141277a6fe2031287b 100644 |
--- a/chrome/browser/printing/print_job_worker.cc |
+++ b/chrome/browser/printing/print_job_worker.cc |
@@ -111,11 +111,6 @@ void PrintJobWorker::SetNewOwner(PrintJobWorkerOwner* new_owner) { |
owner_ = new_owner; |
} |
-void PrintJobWorker::SetPrintDestination( |
- PrintDestinationInterface* destination) { |
- destination_ = destination; |
-} |
- |
void PrintJobWorker::GetSettings( |
bool ask_user_for_settings, |
int document_page_count, |
@@ -134,7 +129,7 @@ void PrintJobWorker::GetSettings( |
// When we delegate to a destination, we don't ask the user for settings. |
// TODO(mad): Ask the destination for settings. |
- if (ask_user_for_settings && destination_.get() == NULL) { |
+ if (ask_user_for_settings) { |
BrowserThread::PostTask( |
BrowserThread::UI, FROM_HERE, |
base::Bind(&HoldRefCallback, make_scoped_refptr(owner_), |
@@ -277,8 +272,6 @@ void PrintJobWorker::OnNewPage() { |
} |
// We have enough information to initialize page_number_. |
page_number_.Init(document_->settings(), page_count); |
- if (destination_.get() != NULL) |
- destination_->SetPageCount(page_count); |
} |
DCHECK_NE(page_number_, PageNumber::npos()); |
@@ -375,18 +368,6 @@ void PrintJobWorker::SpoolPage(PrintedPage* page) { |
return; |
} |
- if (destination_.get() != NULL) { |
- std::vector<uint8> metabytes(page->metafile()->GetDataSize()); |
- bool success = page->metafile()->GetData( |
- reinterpret_cast<void*>(&metabytes[0]), metabytes.size()); |
- DCHECK(success) << "Failed to get metafile data."; |
- destination_->SetPageContent( |
- page->page_number(), |
- reinterpret_cast<void*>(&metabytes[0]), |
- metabytes.size()); |
- return; |
- } |
- |
// Actual printing. |
#if defined(OS_WIN) || defined(OS_MACOSX) |
document_->RenderPrintedPage(*page, printing_context_->context()); |