summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-04 08:54:10 +0000
committerrsleevi@chromium.org <rsleevi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-04 08:54:10 +0000
commit7ee2e88cc20da162083e8371d9f73d9ae204fd1f (patch)
tree0762f380421ff6283e81e557fb9ff986d0344640
parent24258f8c58c172fe7ce59822752f9757ebb7e53c (diff)
downloadchromium_src-7ee2e88cc20da162083e8371d9f73d9ae204fd1f.zip
chromium_src-7ee2e88cc20da162083e8371d9f73d9ae204fd1f.tar.gz
chromium_src-7ee2e88cc20da162083e8371d9f73d9ae204fd1f.tar.bz2
RefCounted types should not have public destructors, webkit/ edition
BUG=123295 TEST=it compiles Review URL: https://chromiumcodereview.appspot.com/10416004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140265 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/appcache/appcache_interfaces.h3
-rw-r--r--webkit/appcache/appcache_storage.h7
-rw-r--r--webkit/database/database_tracker.h4
-rw-r--r--webkit/dom_storage/dom_storage_context.h2
-rw-r--r--webkit/fileapi/isolated_mount_point_provider.h3
-rw-r--r--webkit/fileapi/test_mount_point_provider.h3
-rw-r--r--webkit/glue/resource_loader_bridge.h5
-rw-r--r--webkit/glue/websocketstreamhandle_delegate.h6
-rw-r--r--webkit/media/webmediaplayer_delegate.h4
-rw-r--r--webkit/plugins/npapi/webplugin.h1
-rw-r--r--webkit/plugins/npapi/webplugin_page_delegate.h3
-rw-r--r--webkit/plugins/ppapi/fullscreen_container.h5
-rw-r--r--webkit/plugins/ppapi/plugin_delegate.h8
-rw-r--r--webkit/quota/quota_manager.h5
-rw-r--r--webkit/quota/quota_task.h10
-rw-r--r--webkit/quota/quota_temporary_storage_evictor_unittest.cc4
16 files changed, 49 insertions, 24 deletions
diff --git a/webkit/appcache/appcache_interfaces.h b/webkit/appcache/appcache_interfaces.h
index 113fe47..c9ade5b 100644
--- a/webkit/appcache/appcache_interfaces.h
+++ b/webkit/appcache/appcache_interfaces.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -152,6 +152,7 @@ class APPCACHE_EXPORT AppCacheBackend {
virtual void GetResourceList(
int host_id, std::vector<AppCacheResourceInfo>* resource_infos) = 0;
+ protected:
virtual ~AppCacheBackend() {}
};
diff --git a/webkit/appcache/appcache_storage.h b/webkit/appcache/appcache_storage.h
index 9f74a59..c04315b 100644
--- a/webkit/appcache/appcache_storage.h
+++ b/webkit/appcache/appcache_storage.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -36,8 +36,6 @@ class APPCACHE_EXPORT AppCacheStorage {
class APPCACHE_EXPORT Delegate {
public:
- virtual ~Delegate() {}
-
// If retrieval fails, 'collection' will be NULL.
virtual void OnAllInfo(AppCacheInfoCollection* collection) {}
@@ -70,6 +68,9 @@ class APPCACHE_EXPORT AppCacheStorage {
const GURL& url, const AppCacheEntry& entry,
const GURL& namespace_entry_url, const AppCacheEntry& fallback_entry,
int64 cache_id, int64 group_id, const GURL& mainfest_url) {}
+
+ protected:
+ virtual ~Delegate() {}
};
explicit AppCacheStorage(AppCacheService* service);
diff --git a/webkit/database/database_tracker.h b/webkit/database/database_tracker.h
index 709e662..f8145a8 100644
--- a/webkit/database/database_tracker.h
+++ b/webkit/database/database_tracker.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -86,6 +86,8 @@ class DatabaseTracker
virtual void OnDatabaseScheduledForDeletion(
const string16& origin_identifier,
const string16& database_name) = 0;
+
+ protected:
virtual ~Observer() {}
};
diff --git a/webkit/dom_storage/dom_storage_context.h b/webkit/dom_storage/dom_storage_context.h
index ca2b570..630b408 100644
--- a/webkit/dom_storage/dom_storage_context.h
+++ b/webkit/dom_storage/dom_storage_context.h
@@ -85,6 +85,8 @@ class DomStorageContext
virtual void OnDomStorageAreaCleared(
const DomStorageArea* area,
const GURL& page_url) = 0;
+
+ protected:
virtual ~EventObserver() {}
};
diff --git a/webkit/fileapi/isolated_mount_point_provider.h b/webkit/fileapi/isolated_mount_point_provider.h
index c1e35e0..a071cc9 100644
--- a/webkit/fileapi/isolated_mount_point_provider.h
+++ b/webkit/fileapi/isolated_mount_point_provider.h
@@ -13,6 +13,7 @@
namespace fileapi {
class IsolatedContext;
+class IsolatedFileUtil;
class IsolatedMountPointProvider : public FileSystemMountPointProvider {
public:
@@ -60,7 +61,7 @@ class IsolatedMountPointProvider : public FileSystemMountPointProvider {
IsolatedContext* isolated_context() const;
FilePath GetPathFromURL(const GURL& url) const;
- scoped_ptr<FileSystemFileUtil> isolated_file_util_;
+ scoped_ptr<IsolatedFileUtil> isolated_file_util_;
};
} // namespace fileapi
diff --git a/webkit/fileapi/test_mount_point_provider.h b/webkit/fileapi/test_mount_point_provider.h
index 8a6d76d..c8fdbcd 100644
--- a/webkit/fileapi/test_mount_point_provider.h
+++ b/webkit/fileapi/test_mount_point_provider.h
@@ -18,6 +18,7 @@ class SequencedTaskRunner;
namespace fileapi {
+class LocalFileUtil;
class FileSystemQuotaUtil;
// This should be only used for testing.
@@ -70,7 +71,7 @@ class FILEAPI_EXPORT_PRIVATE TestMountPointProvider
private:
FilePath base_path_;
- scoped_ptr<FileSystemFileUtil> local_file_util_;
+ scoped_ptr<LocalFileUtil> local_file_util_;
scoped_ptr<FileSystemQuotaUtil> quota_util_;
};
diff --git a/webkit/glue/resource_loader_bridge.h b/webkit/glue/resource_loader_bridge.h
index cb5f5b7..45a6bbe 100644
--- a/webkit/glue/resource_loader_bridge.h
+++ b/webkit/glue/resource_loader_bridge.h
@@ -294,8 +294,6 @@ class ResourceLoaderBridge {
// for more information.
class Peer {
public:
- virtual ~Peer() {}
-
// Called as upload progress is made.
// note: only for requests with LOAD_ENABLE_UPLOAD_PROGRESS set
virtual void OnUploadProgress(uint64 position, uint64 size) = 0;
@@ -341,6 +339,9 @@ class ResourceLoaderBridge {
const net::URLRequestStatus& status,
const std::string& security_info,
const base::TimeTicks& completion_time) = 0;
+
+ protected:
+ virtual ~Peer() {}
};
// use WebKitPlatformSupportImpl::CreateResourceLoader() for construction, but
diff --git a/webkit/glue/websocketstreamhandle_delegate.h b/webkit/glue/websocketstreamhandle_delegate.h
index 2148699..272538d 100644
--- a/webkit/glue/websocketstreamhandle_delegate.h
+++ b/webkit/glue/websocketstreamhandle_delegate.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -16,7 +16,6 @@ namespace webkit_glue {
class WebSocketStreamHandleDelegate {
public:
WebSocketStreamHandleDelegate() {}
- virtual ~WebSocketStreamHandleDelegate() {}
virtual void WillOpenStream(WebKit::WebSocketStreamHandle* handle,
const GURL& url) {}
@@ -30,6 +29,9 @@ class WebSocketStreamHandleDelegate {
virtual void DidReceiveData(WebKit::WebSocketStreamHandle* handle,
const char* data, int len) {}
virtual void DidClose(WebKit::WebSocketStreamHandle*) {}
+
+ protected:
+ virtual ~WebSocketStreamHandleDelegate() {}
};
} // namespace webkit_glue
diff --git a/webkit/media/webmediaplayer_delegate.h b/webkit/media/webmediaplayer_delegate.h
index cd595f1..7f5e4ee 100644
--- a/webkit/media/webmediaplayer_delegate.h
+++ b/webkit/media/webmediaplayer_delegate.h
@@ -15,7 +15,6 @@ namespace webkit_media {
class WebMediaPlayerDelegate {
public:
WebMediaPlayerDelegate() {}
- virtual ~WebMediaPlayerDelegate() {}
// The specified player started playing media.
virtual void DidPlay(WebKit::WebMediaPlayer* player) {}
@@ -25,6 +24,9 @@ class WebMediaPlayerDelegate {
// The specified player was destroyed. Do not call any methods on it.
virtual void PlayerGone(WebKit::WebMediaPlayer* player) {}
+
+ protected:
+ virtual ~WebMediaPlayerDelegate() {}
};
} // namespace webkit_media
diff --git a/webkit/plugins/npapi/webplugin.h b/webkit/plugins/npapi/webplugin.h
index 4c5d41c..a7d86cf 100644
--- a/webkit/plugins/npapi/webplugin.h
+++ b/webkit/plugins/npapi/webplugin.h
@@ -176,6 +176,7 @@ class WebPlugin {
class WebPluginResourceClient {
public:
virtual ~WebPluginResourceClient() {}
+
virtual void WillSendRequest(const GURL& url, int http_status_code) = 0;
// The request_is_seekable parameter indicates whether byte range requests
// can be issued for the underlying stream.
diff --git a/webkit/plugins/npapi/webplugin_page_delegate.h b/webkit/plugins/npapi/webplugin_page_delegate.h
index 496bd6f..ec4b34a 100644
--- a/webkit/plugins/npapi/webplugin_page_delegate.h
+++ b/webkit/plugins/npapi/webplugin_page_delegate.h
@@ -60,6 +60,9 @@ class WebPluginPageDelegate {
// The WebCookieJar to use for this plugin.
virtual WebKit::WebCookieJar* GetCookieJar() = 0;
+
+ protected:
+ virtual ~WebPluginPageDelegate() {}
};
} // namespace npapi
diff --git a/webkit/plugins/ppapi/fullscreen_container.h b/webkit/plugins/ppapi/fullscreen_container.h
index f8d4356..88500cd 100644
--- a/webkit/plugins/ppapi/fullscreen_container.h
+++ b/webkit/plugins/ppapi/fullscreen_container.h
@@ -21,8 +21,6 @@ namespace ppapi {
// plugins, that only handles painting.
class FullscreenContainer {
public:
- virtual ~FullscreenContainer() {}
-
// Invalidates the full plugin region.
virtual void Invalidate() = 0;
@@ -43,6 +41,9 @@ class FullscreenContainer {
// The returned object is owned by FullscreenContainer.
virtual MouseLockDispatcher* GetMouseLockDispatcher() = 0;
+
+ protected:
+ virtual ~FullscreenContainer() {}
};
} // namespace ppapi
diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h
index c9bf986..1908a53 100644
--- a/webkit/plugins/ppapi/plugin_delegate.h
+++ b/webkit/plugins/ppapi/plugin_delegate.h
@@ -282,10 +282,14 @@ class PluginDelegate {
class PlatformVideoCapture : public media::VideoCapture,
public base::RefCounted<PlatformVideoCapture> {
public:
- virtual ~PlatformVideoCapture() {}
-
// Detaches the event handler and stops sending notifications to it.
virtual void DetachEventHandler() = 0;
+
+ protected:
+ virtual ~PlatformVideoCapture() {}
+
+ private:
+ friend class base::RefCounted<PlatformVideoCapture>;
};
// Provides access to the ppapi broker.
diff --git a/webkit/quota/quota_manager.h b/webkit/quota/quota_manager.h
index eaa4757..bcf55c2 100644
--- a/webkit/quota/quota_manager.h
+++ b/webkit/quota/quota_manager.h
@@ -64,8 +64,6 @@ class QuotaEvictionHandler {
const QuotaAndUsage& quota_and_usage)>
GetUsageAndQuotaForEvictionCallback;
- virtual ~QuotaEvictionHandler() {}
-
// Returns the least recently used origin. It might return empty
// GURL when there are no evictable origins.
virtual void GetLRUOrigin(
@@ -79,6 +77,9 @@ class QuotaEvictionHandler {
virtual void GetUsageAndQuotaForEviction(
const GetUsageAndQuotaForEvictionCallback& callback) = 0;
+
+ protected:
+ virtual ~QuotaEvictionHandler() {}
};
struct UsageInfo {
diff --git a/webkit/quota/quota_task.h b/webkit/quota/quota_task.h
index ae9b2f1..6ade830 100644
--- a/webkit/quota/quota_task.h
+++ b/webkit/quota/quota_task.h
@@ -11,6 +11,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
+#include "base/sequenced_task_runner_helpers.h"
namespace base {
class SingleThreadTaskRunner;
@@ -26,11 +27,11 @@ class QuotaThreadTask;
// TODO(kinuko): Revise this using base::Callback.
class QuotaTask {
public:
- virtual ~QuotaTask();
void Start();
protected:
explicit QuotaTask(QuotaTaskObserver* observer);
+ virtual ~QuotaTask();
// The task body.
virtual void Run() = 0;
@@ -52,8 +53,10 @@ class QuotaTask {
}
private:
+ friend class base::DeleteHelper<QuotaTask>;
friend class QuotaTaskObserver;
friend class QuotaThreadTask;
+
void Abort();
QuotaTaskObserver* observer_;
scoped_refptr<base::SingleThreadTaskRunner> original_task_runner_;
@@ -96,14 +99,13 @@ class QuotaThreadTask : public QuotaTask,
};
class QuotaTaskObserver {
- public:
- virtual ~QuotaTaskObserver();
-
protected:
friend class QuotaTask;
friend class QuotaThreadTask;
QuotaTaskObserver();
+ virtual ~QuotaTaskObserver();
+
void RegisterTask(QuotaTask* task);
void UnregisterTask(QuotaTask* task);
diff --git a/webkit/quota/quota_temporary_storage_evictor_unittest.cc b/webkit/quota/quota_temporary_storage_evictor_unittest.cc
index dc87a99..9e28721 100644
--- a/webkit/quota/quota_temporary_storage_evictor_unittest.cc
+++ b/webkit/quota/quota_temporary_storage_evictor_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -222,7 +222,7 @@ class QuotaTemporaryStorageEvictorTest : public testing::Test {
reset_min_available_disk_space_to_start_eviction();
}
- scoped_ptr<QuotaEvictionHandler> quota_eviction_handler_;
+ scoped_ptr<MockQuotaEvictionHandler> quota_eviction_handler_;
scoped_ptr<QuotaTemporaryStorageEvictor> temporary_storage_evictor_;
int num_get_usage_and_quota_for_eviction_;