Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4480)

Unified Diff: chrome/service/cloud_print/print_system_cups.cc

Issue 10065040: RefCounted types should not have public destructors, chrome/ remaining parts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implementation fixes Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/service/cloud_print/print_system_cups.cc
diff --git a/chrome/service/cloud_print/print_system_cups.cc b/chrome/service/cloud_print/print_system_cups.cc
index cbaf2cd91ac87d3120fa757a9cccf7cce88d596a..cb69be61493389283975545267257c55350aaf91 100644
--- a/chrome/service/cloud_print/print_system_cups.cc
+++ b/chrome/service/cloud_print/print_system_cups.cc
@@ -127,6 +127,8 @@ class PrintSystemCUPS : public PrintSystem {
}
private:
+ virtual ~PrintSystemCUPS() {}
+
// Following functions are wrappers around corresponding CUPS functions.
// <functions>2() are called when print server is specified, and plain
// version in another case. There is an issue specifing CUPS_HTTP_DEFAULT
@@ -173,9 +175,6 @@ class PrintServerWatcherCUPS
: print_system_(print_system),
delegate_(NULL) {
}
- ~PrintServerWatcherCUPS() {
- StopWatching();
- }
// PrintSystem::PrintServerWatcher implementation.
virtual bool StartWatching(
@@ -209,6 +208,11 @@ class PrintServerWatcherCUPS
print_system_->GetUpdateTimeout());
}
+ protected:
+ virtual ~PrintServerWatcherCUPS() {
+ StopWatching();
+ }
+
private:
std::string GetPrintersHash() {
printing::PrinterList printer_list;
@@ -245,10 +249,6 @@ class PrinterWatcherCUPS
print_system_(print_system) {
}
- ~PrinterWatcherCUPS() {
- StopWatching();
- }
-
// PrintSystem::PrinterWatcher implementation.
virtual bool StartWatching(
PrintSystem::PrinterWatcher::Delegate* delegate) OVERRIDE{
@@ -320,6 +320,11 @@ class PrinterWatcherCUPS
print_system_->GetUpdateTimeout());
}
+ protected:
+ virtual ~PrinterWatcherCUPS() {
+ StopWatching();
+ }
+
private:
std::string GetSettingsHash() {
printing::PrinterBasicInfo info;
@@ -387,6 +392,9 @@ class JobSpoolerCUPS : public PrintSystem::JobSpooler {
delegate->OnJobSpoolFailed();
}
+ protected:
+ virtual ~JobSpoolerCUPS() {}
+
private:
scoped_refptr<PrintSystemCUPS> print_system_;

Powered by Google App Engine
This is Rietveld 408576698