summaryrefslogtreecommitdiffstats
path: root/net/disk_cache
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 23:34:24 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-05 23:34:24 +0000
commit5389bc7ba5360633af04b9cf15497d56ce640ead (patch)
tree4518c05f3bad18a5b2f4739fc1a1c187651f9799 /net/disk_cache
parent4070a6b1efcb2dbea12508a0b912cfa3bc86f47e (diff)
downloadchromium_src-5389bc7ba5360633af04b9cf15497d56ce640ead.zip
chromium_src-5389bc7ba5360633af04b9cf15497d56ce640ead.tar.gz
chromium_src-5389bc7ba5360633af04b9cf15497d56ce640ead.tar.bz2
Second patch in making destructors of refcounted objects private.
BUG=26749 Review URL: http://codereview.chromium.org/368001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/disk_cache')
-rw-r--r--net/disk_cache/file_posix.cc5
-rw-r--r--net/disk_cache/mapped_file.h3
-rw-r--r--net/disk_cache/sparse_control.cc3
3 files changed, 7 insertions, 4 deletions
diff --git a/net/disk_cache/file_posix.cc b/net/disk_cache/file_posix.cc
index 3ffdb45..bfaad59 100644
--- a/net/disk_cache/file_posix.cc
+++ b/net/disk_cache/file_posix.cc
@@ -35,8 +35,6 @@ class BackgroundIO : public base::RefCountedThreadSafe<BackgroundIO> {
buf_len_(buf_len), offset_(offset), controller_(controller),
bytes_(0) {}
- ~BackgroundIO() {}
-
// Read and Write are the operations that can be performed asynchronously.
// The actual parameters for the operation are setup in the constructor of
// the object, with the exception of |delete_buffer|, that allows a write
@@ -75,6 +73,9 @@ class BackgroundIO : public base::RefCountedThreadSafe<BackgroundIO> {
}
private:
+ friend class base::RefCountedThreadSafe<BackgroundIO>;
+ ~BackgroundIO() {}
+
// An event to signal when the operation completes, and the user callback that
// has to be invoked. These members are accessed directly by the controller.
base::WaitableEvent io_completed_;
diff --git a/net/disk_cache/mapped_file.h b/net/disk_cache/mapped_file.h
index 7d58532..5b34141 100644
--- a/net/disk_cache/mapped_file.h
+++ b/net/disk_cache/mapped_file.h
@@ -38,10 +38,9 @@ class MappedFile : public File {
bool Load(const FileBlock* block);
bool Store(const FileBlock* block);
- protected:
+ private:
virtual ~MappedFile();
- private:
bool init_;
#if defined(OS_WIN)
HANDLE section_;
diff --git a/net/disk_cache/sparse_control.cc b/net/disk_cache/sparse_control.cc
index fb304be..509ce78 100644
--- a/net/disk_cache/sparse_control.cc
+++ b/net/disk_cache/sparse_control.cc
@@ -60,6 +60,9 @@ class ChildrenDeleter
void ReadData(disk_cache::Addr address, int len);
private:
+ friend class base::RefCounted<ChildrenDeleter>;
+ ~ChildrenDeleter() {}
+
void DeleteChildren();
disk_cache::BackendImpl* backend_;