Index: chrome/browser/printing/print_job_manager.cc |
=================================================================== |
--- chrome/browser/printing/print_job_manager.cc (revision 19830) |
+++ chrome/browser/printing/print_job_manager.cc (working copy) |
@@ -4,8 +4,6 @@ |
#include "chrome/browser/printing/print_job_manager.h" |
-#include "base/file_util.h" |
-#include "base/string_util.h" |
#include "chrome/browser/printing/print_job.h" |
#include "chrome/browser/printing/printer_query.h" |
#include "chrome/browser/printing/printed_document.h" |
@@ -15,12 +13,9 @@ |
namespace printing { |
-PrintJobManager::PrintJobManager() |
- : debug_dump_path_() { |
+PrintJobManager::PrintJobManager() { |
registrar_.Add(this, NotificationType::PRINT_JOB_EVENT, |
NotificationService::AllSources()); |
- registrar_.Add(this, NotificationType::PRINTED_DOCUMENT_UPDATED, |
- NotificationService::AllSources()); |
} |
PrintJobManager::~PrintJobManager() { |
@@ -84,13 +79,6 @@ |
*Details<JobEventDetails>(details).ptr()); |
break; |
} |
- case NotificationType::PRINTED_DOCUMENT_UPDATED: { |
- PrintedPage* printed_page = Details<PrintedPage>(details).ptr(); |
- if (printed_page) |
- OnPrintedDocumentUpdated(*Source<PrintedDocument>(source).ptr(), |
- *printed_page); |
- break; |
- } |
default: { |
NOTREACHED(); |
break; |
@@ -152,24 +140,4 @@ |
} |
} |
-void PrintJobManager::OnPrintedDocumentUpdated(const PrintedDocument& document, |
- const PrintedPage& page) { |
- if (debug_dump_path_.empty()) |
- return; |
- |
- std::wstring filename; |
- filename += document.date(); |
- filename += L"_"; |
- filename += document.time(); |
- filename += L"_"; |
- filename += document.name(); |
- filename += L"_"; |
- filename += StringPrintf(L"%02d", page.page_number()); |
- filename += L"_.emf"; |
- file_util::ReplaceIllegalCharacters(&filename, '_'); |
- std::wstring path(debug_dump_path_); |
- file_util::AppendToPath(&path, filename); |
- page.emf()->SaveTo(path); |
-} |
- |
} // namespace printing |