From 184a6c8f920ecc6460a34f1a1a67cb2ec41307f7 Mon Sep 17 00:00:00 2001 From: "thestig@chromium.org" Date: Tue, 4 Oct 2011 20:07:30 +0000 Subject: Cleanup: Remove dead code - printing::PrintedPagesSource::RenderSourceName() and printing::PrintedDocument::url(). They were only used by the old headers/footers code. BUG=none TEST=none Review URL: http://codereview.chromium.org/8113029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103970 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/printing/print_job_unittest.cc | 7 ++----- chrome/browser/printing/print_view_manager.cc | 8 -------- chrome/browser/printing/print_view_manager.h | 11 +++++------ 3 files changed, 7 insertions(+), 19 deletions(-) (limited to 'chrome/browser') diff --git a/chrome/browser/printing/print_job_unittest.cc b/chrome/browser/printing/print_job_unittest.cc index 0994fca..946669a 100644 --- a/chrome/browser/printing/print_job_unittest.cc +++ b/chrome/browser/printing/print_job_unittest.cc @@ -9,7 +9,6 @@ #include "chrome/common/chrome_notification_types.h" #include "content/common/notification_registrar.h" #include "content/common/notification_service.h" -#include "googleurl/src/gurl.h" #include "printing/printed_pages_source.h" #include "testing/gtest/include/gtest/gtest.h" @@ -17,12 +16,9 @@ namespace { class TestSource : public printing::PrintedPagesSource { public: - virtual string16 RenderSourceName() { + virtual string16 RenderSourceName() OVERRIDE { return string16(); } - virtual GURL RenderSourceUrl() { - return GURL(); - } }; class TestPrintJobWorker : public printing::PrintJobWorker { @@ -59,6 +55,7 @@ class TestOwner : public printing::PrintJobWorkerOwner { virtual int cookie() const { return 42; } + private: printing::PrintSettings settings_; }; diff --git a/chrome/browser/printing/print_view_manager.cc b/chrome/browser/printing/print_view_manager.cc index fe6e78f..9d48763 100644 --- a/chrome/browser/printing/print_view_manager.cc +++ b/chrome/browser/printing/print_view_manager.cc @@ -17,7 +17,6 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/print_messages.h" #include "content/browser/renderer_host/render_view_host.h" -#include "content/browser/tab_contents/navigation_entry.h" #include "content/browser/tab_contents/tab_contents.h" #include "content/common/notification_details.h" #include "content/common/notification_service.h" @@ -159,13 +158,6 @@ string16 PrintViewManager::RenderSourceName() { return GenerateRenderSourceName(tab_contents()); } -GURL PrintViewManager::RenderSourceUrl() { - NavigationEntry* entry = tab_contents()->controller().GetActiveEntry(); - if (entry) - return entry->virtual_url(); - return GURL(); -} - void PrintViewManager::OnDidGetPrintedPagesCount(int cookie, int number_pages) { DCHECK_GT(cookie, 0); DCHECK_GT(number_pages, 0); diff --git a/chrome/browser/printing/print_view_manager.h b/chrome/browser/printing/print_view_manager.h index ec396e4..ec31134 100644 --- a/chrome/browser/printing/print_view_manager.h +++ b/chrome/browser/printing/print_view_manager.h @@ -69,16 +69,15 @@ class PrintViewManager : public NotificationObserver, void ResetTitleOverride(); // PrintedPagesSource implementation. - virtual string16 RenderSourceName(); - virtual GURL RenderSourceUrl(); + virtual string16 RenderSourceName() OVERRIDE; // NotificationObserver implementation. virtual void Observe(int type, const NotificationSource& source, - const NotificationDetails& details); + const NotificationDetails& details) OVERRIDE; // TabContentsObserver implementation. - virtual bool OnMessageReceived(const IPC::Message& message); + virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; // Terminates or cancels the print job if one was pending. virtual void RenderViewGone(); @@ -98,8 +97,8 @@ class PrintViewManager : public NotificationObserver, void OnNotifyPrintJobEvent(const JobEventDetails& event_details); // Requests the RenderView to render all the missing pages for the print job. - // No-op if no print job is pending. Returns true if at least one page has been - // requested to the renderer. + // No-op if no print job is pending. Returns true if at least one page has + // been requested to the renderer. bool RenderAllMissingPagesNow(); // Quits the current message loop if these conditions hold true: a document is -- cgit v1.1