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

Unified Diff: chrome/browser/chromeos/gdata/gdata_protocol_handler.cc

Issue 10386206: RefCounted types should not have public destructors, chromeos edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to r143931 Created 8 years, 6 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/browser/chromeos/gdata/gdata_protocol_handler.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc b/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
index a53496f2560e2fc527c85073da2026cc38f5e3a0..365a5ac100ecc12a39409f773a032b8db61543ac 100644
--- a/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
+++ b/chrome/browser/chromeos/gdata/gdata_protocol_handler.cc
@@ -127,7 +127,6 @@ void CancelGDataDownloadOnUIThread(const FilePath& gdata_file_path) {
class GDataURLRequestJob : public net::URLRequestJob {
public:
explicit GDataURLRequestJob(net::URLRequest* request);
- virtual ~GDataURLRequestJob();
// net::URLRequestJob overrides:
virtual void Start() OVERRIDE;
@@ -139,6 +138,9 @@ class GDataURLRequestJob : public net::URLRequestJob {
int buf_size,
int* bytes_read) OVERRIDE;
+ protected:
+ virtual ~GDataURLRequestJob();
+
private:
// Helper for Start() to let us start asynchronously.
void StartAsync(GDataFileSystem** file_system);
@@ -233,10 +235,6 @@ GDataURLRequestJob::GDataURLRequestJob(net::URLRequest* request)
download_growable_buf_, download_growable_buf_->capacity());
}
-GDataURLRequestJob::~GDataURLRequestJob() {
- CloseFileStream();
-}
-
void GDataURLRequestJob::Start() {
DVLOG(1) << "Starting request";
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
@@ -461,6 +459,12 @@ bool GDataURLRequestJob::ReadRawData(net::IOBuffer* dest,
return rc;
}
+//======================= GDataURLRequestJob protected methods ================
+
+GDataURLRequestJob::~GDataURLRequestJob() {
+ CloseFileStream();
+}
+
//======================= GDataURLRequestJob private methods ===================
void GDataURLRequestJob::StartAsync(GDataFileSystem** file_system) {

Powered by Google App Engine
This is Rietveld 408576698