summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cancelable_request.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/cancelable_request.h')
-rw-r--r--chrome/browser/cancelable_request.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/chrome/browser/cancelable_request.h b/chrome/browser/cancelable_request.h
index 80e4afc..d081c4d 100644
--- a/chrome/browser/cancelable_request.h
+++ b/chrome/browser/cancelable_request.h
@@ -369,8 +369,6 @@ class CancelableRequestBase :
canceled_(false) {
callback_thread_ = MessageLoop::current();
}
- virtual ~CancelableRequestBase() {
- }
CancelableRequestConsumerBase* consumer() const {
return consumer_;
@@ -390,6 +388,9 @@ class CancelableRequestBase :
}
protected:
+ friend class base::RefCountedThreadSafe<CancelableRequestBase>;
+ virtual ~CancelableRequestBase() {}
+
// Initializes the object with the particulars from the provider. It may only
// be called once (it is called by the provider, which is a friend).
void Init(CancelableRequestProvider* provider,
@@ -452,6 +453,9 @@ class CancelableRequestBase :
// DoodieRequest(CallbackType* callback) : CancelableRequest(callback) {
// }
//
+// private:
+// ~DoodieRequest() {}
+//
// int input_arg1;
// std::wstring input_arg2;
// };
@@ -469,8 +473,6 @@ class CancelableRequest : public CancelableRequestBase {
callback_(callback) {
DCHECK(callback) << "We should always have a callback";
}
- virtual ~CancelableRequest() {
- }
// Dispatches the parameters to the correct thread so the callback can be
// executed there. The caller does not need to check for cancel before
@@ -503,6 +505,9 @@ class CancelableRequest : public CancelableRequestBase {
}
}
+ protected:
+ virtual ~CancelableRequest() {}
+
private:
// Executes the callback and notifies the provider and the consumer that this
// request has been completed. This must be called on the callback_thread_.
@@ -545,11 +550,11 @@ class CancelableRequest1 : public CancelableRequest<CB> {
: CancelableRequest<CB>(callback) {
}
- virtual ~CancelableRequest1() {
- }
-
// The value.
Type value;
+
+ protected:
+ virtual ~CancelableRequest1() {}
};
#endif // CHROME_BROWSER_CANCELABLE_REQUEST_H__