diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-04 20:07:30 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-04 20:07:30 +0000 |
commit | 184a6c8f920ecc6460a34f1a1a67cb2ec41307f7 (patch) | |
tree | 5f3d428dcbd5c538cbb796ea872e4339f2ec8630 | |
parent | 6d87f0e61c2b6f1a1ce9bea468b910a0ddb9ebc2 (diff) | |
download | chromium_src-184a6c8f920ecc6460a34f1a1a67cb2ec41307f7.zip chromium_src-184a6c8f920ecc6460a34f1a1a67cb2ec41307f7.tar.gz chromium_src-184a6c8f920ecc6460a34f1a1a67cb2ec41307f7.tar.bz2 |
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
-rw-r--r-- | chrome/browser/printing/print_job_unittest.cc | 7 | ||||
-rw-r--r-- | chrome/browser/printing/print_view_manager.cc | 8 | ||||
-rw-r--r-- | chrome/browser/printing/print_view_manager.h | 11 | ||||
-rw-r--r-- | printing/printed_document.cc | 1 | ||||
-rw-r--r-- | printing/printed_document.h | 9 | ||||
-rw-r--r-- | printing/printed_pages_source.h | 8 |
6 files changed, 9 insertions, 35 deletions
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 diff --git a/printing/printed_document.cc b/printing/printed_document.cc index d8edd3a..fc6e8e3 100644 --- a/printing/printed_document.cc +++ b/printing/printed_document.cc @@ -224,7 +224,6 @@ PrintedDocument::Immutable::Immutable(const PrintSettings& settings, : settings_(settings), source_message_loop_(MessageLoop::current()), name_(source->RenderSourceName()), - url_(source->RenderSourceUrl()), cookie_(cookie) { } diff --git a/printing/printed_document.h b/printing/printed_document.h index 27577f7..4fe415b 100644 --- a/printing/printed_document.h +++ b/printing/printed_document.h @@ -11,7 +11,6 @@ #include "base/memory/scoped_ptr.h" #include "base/string16.h" #include "base/synchronization/lock.h" -#include "googleurl/src/gurl.h" #include "printing/print_settings.h" #include "ui/gfx/native_widget_types.h" @@ -94,10 +93,7 @@ class PRINTING_EXPORT PrintedDocument // Getters. All these items are immutable hence thread-safe. const PrintSettings& settings() const { return immutable_.settings_; } - const string16& name() const { - return immutable_.name_; - } - const GURL& url() const { return immutable_.url_; } + const string16& name() const { return immutable_.name_; } int cookie() const { return immutable_.cookie_; } // Sets a path where to dump printing output files for debugging. If never set @@ -161,9 +157,6 @@ class PRINTING_EXPORT PrintedDocument // Document name. Immutable. string16 name_; - // URL that generated this document. Immutable. - GURL url_; - // Cookie to uniquely identify this document. It is used to make sure that a // PrintedPage is correctly belonging to the PrintedDocument. Since // PrintedPage generation is completely asynchronous, it could be easy to diff --git a/printing/printed_pages_source.h b/printing/printed_pages_source.h index c466072..3af916b 100644 --- a/printing/printed_pages_source.h +++ b/printing/printed_pages_source.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -7,9 +7,6 @@ #include "base/string16.h" -class GURL; -class MessageLoop; - namespace printing { class PrintedDocument; @@ -20,9 +17,6 @@ class PrintedPagesSource { // Returns the document title. virtual string16 RenderSourceName() = 0; - // Returns the URL's source of the document if applicable. - virtual GURL RenderSourceUrl() = 0; - protected: virtual ~PrintedPagesSource() {} }; |