Index: chrome/service/cloud_print/print_system.h |
diff --git a/chrome/service/cloud_print/print_system.h b/chrome/service/cloud_print/print_system.h |
index f1ba32409f8885edd22a7f642265224fc94d942f..3e81dab4b5ba3859675a581e305f708d8d7e3ae6 100644 |
--- a/chrome/service/cloud_print/print_system.h |
+++ b/chrome/service/cloud_print/print_system.h |
@@ -84,9 +84,12 @@ class PrintSystem : public base::RefCountedThreadSafe<PrintSystem> { |
virtual ~Delegate() {} |
}; |
- virtual ~PrintServerWatcher(); |
virtual bool StartWatching(PrintServerWatcher::Delegate* delegate) = 0; |
virtual bool StopWatching() = 0; |
+ |
+ protected: |
+ friend class base::RefCountedThreadSafe<PrintServerWatcher>; |
+ virtual ~PrintServerWatcher(); |
}; |
class PrinterWatcher : public base::RefCountedThreadSafe<PrinterWatcher> { |
@@ -102,11 +105,14 @@ class PrintSystem : public base::RefCountedThreadSafe<PrintSystem> { |
virtual ~Delegate() {} |
}; |
- virtual ~PrinterWatcher(); |
virtual bool StartWatching(PrinterWatcher::Delegate* delegate) = 0; |
virtual bool StopWatching() = 0; |
virtual bool GetCurrentPrinterInfo( |
printing::PrinterBasicInfo* printer_info) = 0; |
+ |
+ protected: |
+ friend class base::RefCountedThreadSafe<PrinterWatcher>; |
+ virtual ~PrinterWatcher(); |
}; |
class JobSpooler : public base::RefCountedThreadSafe<JobSpooler> { |
@@ -119,7 +125,6 @@ class PrintSystem : public base::RefCountedThreadSafe<PrintSystem> { |
virtual void OnJobSpoolFailed() = 0; |
}; |
- virtual ~JobSpooler(); |
// Spool job to the printer asynchronously. Caller will be notified via |
// |delegate|. Note that only one print job can be in progress at any given |
// time. Subsequent calls to Spool (before the Delegate::OnJobSpoolSucceeded |
@@ -131,6 +136,9 @@ class PrintSystem : public base::RefCountedThreadSafe<PrintSystem> { |
const std::string& job_title, |
const std::vector<std::string>& tags, |
JobSpooler::Delegate* delegate) = 0; |
+ protected: |
+ friend class base::RefCountedThreadSafe<JobSpooler>; |
+ virtual ~JobSpooler(); |
}; |
class PrintSystemResult { |
@@ -141,10 +149,10 @@ class PrintSystem : public base::RefCountedThreadSafe<PrintSystem> { |
std::string message() const { return message_; } |
private: |
+ PrintSystemResult() {} |
+ |
bool succeeded_; |
std::string message_; |
- |
- PrintSystemResult() { } |
}; |
typedef base::Callback<void(bool, |
@@ -152,8 +160,6 @@ class PrintSystem : public base::RefCountedThreadSafe<PrintSystem> { |
const printing::PrinterCapsAndDefaults&)> |
PrinterCapsAndDefaultsCallback; |
- virtual ~PrintSystem(); |
- |
// Initialize print system. This need to be called before any other function |
// of PrintSystem. |
virtual PrintSystemResult Init() = 0; |
@@ -199,6 +205,10 @@ class PrintSystem : public base::RefCountedThreadSafe<PrintSystem> { |
// Return NULL if no print system available. |
static scoped_refptr<PrintSystem> CreateInstance( |
const base::DictionaryValue* print_system_settings); |
+ |
+ protected: |
+ friend class base::RefCountedThreadSafe<PrintSystem>; |
+ virtual ~PrintSystem(); |
}; |