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

Unified Diff: content/browser/trace_subscriber_stdio.cc

Issue 10068037: RefCounted types should not have public destructors, content/browser part 1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MSVC 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
« no previous file with comments | « content/browser/trace_message_filter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/trace_subscriber_stdio.cc
diff --git a/content/browser/trace_subscriber_stdio.cc b/content/browser/trace_subscriber_stdio.cc
index a55c611a8f9777819f4c279856696ccc3f734db8..e390212b8fe4085ea625a1a122085a62d7704c3b 100644
--- a/content/browser/trace_subscriber_stdio.cc
+++ b/content/browser/trace_subscriber_stdio.cc
@@ -20,10 +20,6 @@ class TraceSubscriberStdioImpl
: path_(path),
file_(0) {}
- ~TraceSubscriberStdioImpl() {
- CloseFile();
- }
-
void OnStart() {
DCHECK(!file_);
file_ = file_util::OpenFile(path_, "w+");
@@ -47,6 +43,12 @@ class TraceSubscriberStdioImpl
}
private:
+ friend class base::RefCountedThreadSafe<TraceSubscriberStdioImpl>;
+
+ ~TraceSubscriberStdioImpl() {
+ CloseFile();
+ }
+
bool IsValid() {
return file_ && (0 == ferror(file_));
}
« no previous file with comments | « content/browser/trace_message_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698