diff options
author | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-02 02:38:08 +0000 |
---|---|---|
committer | rsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-02 02:38:08 +0000 |
commit | ab9327cca6229082f06a62b58790ba57a3f05f1a (patch) | |
tree | e171c605d554a0d14b4c10b78c139e769064c6cf /printing | |
parent | 1b29524a560d76577ae8149013c0a9e22782a20c (diff) | |
download | chromium_src-ab9327cca6229082f06a62b58790ba57a3f05f1a.zip chromium_src-ab9327cca6229082f06a62b58790ba57a3f05f1a.tar.gz chromium_src-ab9327cca6229082f06a62b58790ba57a3f05f1a.tar.bz2 |
RefCounted types should not have public destructors, printing/ and ui/
BUG=123295
TEST=none
Review URL: http://codereview.chromium.org/10067034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134859 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'printing')
-rw-r--r-- | printing/backend/print_backend.h | 6 | ||||
-rw-r--r-- | printing/backend/print_backend_chromeos.cc | 24 | ||||
-rw-r--r-- | printing/backend/print_backend_cups.cc | 8 | ||||
-rw-r--r-- | printing/backend/print_backend_win.cc | 23 |
4 files changed, 30 insertions, 31 deletions
diff --git a/printing/backend/print_backend.h b/printing/backend/print_backend.h index 8e28b2d..84a9d90 100644 --- a/printing/backend/print_backend.h +++ b/printing/backend/print_backend.h @@ -53,8 +53,6 @@ struct PRINTING_EXPORT PrinterCapsAndDefaults { class PRINTING_EXPORT PrintBackend : public base::RefCountedThreadSafe<PrintBackend> { public: - virtual ~PrintBackend(); - // Enumerates the list of installed local and network printers. virtual bool EnumeratePrinters(PrinterList* printer_list) = 0; @@ -78,6 +76,10 @@ class PRINTING_EXPORT PrintBackend // Return NULL if no print backend available. static scoped_refptr<PrintBackend> CreateInstance( const base::DictionaryValue* print_backend_settings); + + protected: + friend class base::RefCountedThreadSafe<PrintBackend>; + virtual ~PrintBackend(); }; } // namespace printing diff --git a/printing/backend/print_backend_chromeos.cc b/printing/backend/print_backend_chromeos.cc index 767251c..003b0fd 100644 --- a/printing/backend/print_backend_chromeos.cc +++ b/printing/backend/print_backend_chromeos.cc @@ -12,21 +12,19 @@ namespace printing { class PrintBackendChromeOS : public PrintBackend { public: PrintBackendChromeOS(); - virtual ~PrintBackendChromeOS() {} // PrintBackend implementation. - virtual bool EnumeratePrinters(PrinterList* printer_list); - - virtual std::string GetDefaultPrinterName(); - - virtual bool GetPrinterCapsAndDefaults(const std::string& printer_name, - PrinterCapsAndDefaults* printer_info); - - virtual std::string GetPrinterDriverInfo(const std::string& printer_name); - - virtual bool IsValidPrinter(const std::string& printer_name); - - private: + virtual bool EnumeratePrinters(PrinterList* printer_list) OVERRIDE; + virtual std::string GetDefaultPrinterName() OVERRIDE; + virtual bool GetPrinterCapsAndDefaults( + const std::string& printer_name, + PrinterCapsAndDefaults* printer_info) OVERRIDE; + virtual std::string GetPrinterDriverInfo( + const std::string& printer_name) OVERRIDE; + virtual bool IsValidPrinter(const std::string& printer_name) OVERRIDE; + + protected: + virtual ~PrintBackendChromeOS() {} }; PrintBackendChromeOS::PrintBackendChromeOS() {} diff --git a/printing/backend/print_backend_cups.cc b/printing/backend/print_backend_cups.cc index ae0c553..9bba09a 100644 --- a/printing/backend/print_backend_cups.cc +++ b/printing/backend/print_backend_cups.cc @@ -103,22 +103,20 @@ static const char kCUPSPrinterMakeModelOpt[] = "printer-make-and-model"; class PrintBackendCUPS : public PrintBackend { public: PrintBackendCUPS(const GURL& print_server_url, bool blocking); - virtual ~PrintBackendCUPS() {} // PrintBackend implementation. virtual bool EnumeratePrinters(PrinterList* printer_list) OVERRIDE; - virtual std::string GetDefaultPrinterName() OVERRIDE; - virtual bool GetPrinterCapsAndDefaults( const std::string& printer_name, PrinterCapsAndDefaults* printer_info) OVERRIDE; - virtual std::string GetPrinterDriverInfo( const std::string& printer_name) OVERRIDE; - virtual bool IsValidPrinter(const std::string& printer_name) OVERRIDE; + protected: + virtual ~PrintBackendCUPS() {} + private: // Following functions are wrappers around corresponding CUPS functions. // <functions>2() are called when print server is specified, and plain diff --git a/printing/backend/print_backend_win.cc b/printing/backend/print_backend_win.cc index ae178c7..8dca223 100644 --- a/printing/backend/print_backend_win.cc +++ b/printing/backend/print_backend_win.cc @@ -38,18 +38,19 @@ namespace printing { class PrintBackendWin : public PrintBackend { public: PrintBackendWin() {} - virtual ~PrintBackendWin() {} - - virtual bool EnumeratePrinters(PrinterList* printer_list); - - virtual std::string GetDefaultPrinterName(); - virtual bool GetPrinterCapsAndDefaults(const std::string& printer_name, - PrinterCapsAndDefaults* printer_info); - - virtual std::string GetPrinterDriverInfo(const std::string& printer_name); - - virtual bool IsValidPrinter(const std::string& printer_name); + // PrintBackend implementation. + virtual bool EnumeratePrinters(PrinterList* printer_list) OVERRIDE; + virtual std::string GetDefaultPrinterName() OVERRIDE; + virtual bool GetPrinterCapsAndDefaults( + const std::string& printer_name, + PrinterCapsAndDefaults* printer_info) OVERRIDE; + virtual std::string GetPrinterDriverInfo( + const std::string& printer_name) OVERRIDE; + virtual bool IsValidPrinter(const std::string& printer_name) OVERRIDE; + + protected: + virtual ~PrintBackendWin() {} }; bool PrintBackendWin::EnumeratePrinters(PrinterList* printer_list) { |