summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/appcache/appcache.h4
-rw-r--r--webkit/appcache/appcache_group.h4
-rw-r--r--webkit/appcache/appcache_response.cc2
-rw-r--r--webkit/appcache/appcache_response.h9
-rw-r--r--webkit/appcache/appcache_storage.h13
-rw-r--r--webkit/appcache/appcache_update_job_unittest.cc2
-rw-r--r--webkit/database/database_tracker.h5
-rw-r--r--webkit/default_plugin/plugin_install_job_monitor.h5
-rw-r--r--webkit/glue/media/buffered_data_source.h6
-rw-r--r--webkit/glue/media/buffered_data_source_unittest.cc4
-rw-r--r--webkit/glue/plugins/plugin_host.h5
-rw-r--r--webkit/glue/plugins/plugin_instance.h5
-rw-r--r--webkit/glue/plugins/plugin_lib.h5
-rw-r--r--webkit/glue/plugins/plugin_stream.h6
-rw-r--r--webkit/glue/plugins/plugin_string_stream.h3
-rw-r--r--webkit/glue/unittest_test_server.h6
-rw-r--r--webkit/glue/webmediaplayer_impl.h5
-rw-r--r--webkit/tools/test_shell/simple_appcache_system.cc8
-rw-r--r--webkit/tools/test_shell/simple_resource_loader_bridge.cc23
-rw-r--r--webkit/tools/test_shell/test_shell.cc3
-rw-r--r--webkit/tools/test_shell/test_shell_request_context.h4
-rw-r--r--webkit/tools/test_shell/test_web_worker.h4
22 files changed, 100 insertions, 31 deletions
diff --git a/webkit/appcache/appcache.h b/webkit/appcache/appcache.h
index 203b582..57ca42a 100644
--- a/webkit/appcache/appcache.h
+++ b/webkit/appcache/appcache.h
@@ -32,7 +32,6 @@ class AppCache : public base::RefCounted<AppCache> {
typedef std::set<AppCacheHost*> AppCacheHosts;
AppCache(AppCacheService *service, int64 cache_id);
- ~AppCache();
int64 cache_id() const { return cache_id_; }
@@ -80,6 +79,9 @@ class AppCache : public base::RefCounted<AppCache> {
friend class AppCacheGroup;
friend class AppCacheHost;
friend class AppCacheUpdateJobTest;
+ friend class base::RefCounted<AppCache>;
+
+ ~AppCache();
// Use AppCacheGroup::Add/RemoveCache() to manipulate owning group.
void set_owning_group(AppCacheGroup* group) { owning_group_ = group; }
diff --git a/webkit/appcache/appcache_group.h b/webkit/appcache/appcache_group.h
index dece474..fa0f7da 100644
--- a/webkit/appcache/appcache_group.h
+++ b/webkit/appcache/appcache_group.h
@@ -38,7 +38,6 @@ class AppCacheGroup : public base::RefCounted<AppCacheGroup> {
};
AppCacheGroup(AppCacheService* service, const GURL& manifest_url);
- ~AppCacheGroup();
// Adds/removes an update observer, the AppCacheGroup does not take
// ownership of the observer.
@@ -77,8 +76,11 @@ class AppCacheGroup : public base::RefCounted<AppCacheGroup> {
private:
friend class AppCacheUpdateJob;
friend class AppCacheUpdateJobTest;
+ friend class base::RefCounted<AppCacheGroup>;
friend class MockAppCacheStorage; // for old_caches()
+ ~AppCacheGroup();
+
typedef std::vector<AppCache*> Caches;
AppCacheUpdateJob* update_job() { return update_job_; }
diff --git a/webkit/appcache/appcache_response.cc b/webkit/appcache/appcache_response.cc
index 3952d59..e827a14 100644
--- a/webkit/appcache/appcache_response.cc
+++ b/webkit/appcache/appcache_response.cc
@@ -41,6 +41,8 @@ class WrappedPickleIOBuffer : public net::WrappedIOBuffer {
}
private:
+ ~WrappedPickleIOBuffer() {}
+
scoped_ptr<const Pickle> pickle_;
};
diff --git a/webkit/appcache/appcache_response.h b/webkit/appcache/appcache_response.h
index e82521a..6b8e09a 100644
--- a/webkit/appcache/appcache_response.h
+++ b/webkit/appcache/appcache_response.h
@@ -32,7 +32,6 @@ class AppCacheResponseInfo
// AppCacheResponseInfo takes ownership of the http_info.
AppCacheResponseInfo(AppCacheService* service, int64 response_id,
net::HttpResponseInfo* http_info);
- ~AppCacheResponseInfo();
// TODO(michaeln): should the ctor/dtor be hidden from public view?
int64 response_id() const { return response_id_; }
@@ -42,6 +41,9 @@ class AppCacheResponseInfo
}
private:
+ friend class base::RefCounted<AppCacheResponseInfo>;
+ ~AppCacheResponseInfo();
+
const int64 response_id_;
const scoped_ptr<net::HttpResponseInfo> http_response_info_;
const AppCacheService* service_;
@@ -55,6 +57,11 @@ struct HttpResponseInfoIOBuffer
HttpResponseInfoIOBuffer() {}
HttpResponseInfoIOBuffer(net::HttpResponseInfo* info) : http_info(info) {}
+
+ private:
+ friend class base::RefCountedThreadSafe<HttpResponseInfoIOBuffer>;
+
+ ~HttpResponseInfoIOBuffer() {}
};
// Common base class for response reader and writer.
diff --git a/webkit/appcache/appcache_storage.h b/webkit/appcache/appcache_storage.h
index c221054..608ea34 100644
--- a/webkit/appcache/appcache_storage.h
+++ b/webkit/appcache/appcache_storage.h
@@ -177,16 +177,19 @@ class AppCacheStorage {
DelegateReferenceMap::value_type(delegate, this));
}
- ~DelegateReference() {
- if (delegate)
- storage->delegate_references_.erase(delegate);
- }
-
void CancelReference() {
storage->delegate_references_.erase(delegate);
storage = NULL;
delegate = NULL;
}
+
+ private:
+ friend class base::RefCounted<DelegateReference>;
+
+ ~DelegateReference() {
+ if (delegate)
+ storage->delegate_references_.erase(delegate);
+ }
};
typedef std::map<Delegate*, DelegateReference*> DelegateReferenceMap;
typedef std::vector<scoped_refptr<DelegateReference> >
diff --git a/webkit/appcache/appcache_update_job_unittest.cc b/webkit/appcache/appcache_update_job_unittest.cc
index c4cb361..79ee787 100644
--- a/webkit/appcache/appcache_update_job_unittest.cc
+++ b/webkit/appcache/appcache_update_job_unittest.cc
@@ -118,6 +118,8 @@ class RetryRequestTestJob : public URLRequestTestJob {
virtual int GetResponseCode() const { return response_code_; }
private:
+ ~RetryRequestTestJob() {}
+
static std::string retry_headers() {
const char no_retry_after[] =
"HTTP/1.1 503 BOO HOO\0"
diff --git a/webkit/database/database_tracker.h b/webkit/database/database_tracker.h
index 1e017aa..2bcfc6f 100644
--- a/webkit/database/database_tracker.h
+++ b/webkit/database/database_tracker.h
@@ -47,7 +47,6 @@ class DatabaseTracker
};
explicit DatabaseTracker(const FilePath& profile_path);
- ~DatabaseTracker();
void DatabaseOpened(const string16& origin_identifier,
const string16& database_name,
@@ -70,6 +69,10 @@ class DatabaseTracker
const string16& database_name) const;
private:
+ friend class base::RefCountedThreadSafe<DatabaseTracker>;
+
+ ~DatabaseTracker();
+
class CachedOriginInfo {
public:
CachedOriginInfo() : total_size_(0) { }
diff --git a/webkit/default_plugin/plugin_install_job_monitor.h b/webkit/default_plugin/plugin_install_job_monitor.h
index 9ca727e..fc02ed8 100644
--- a/webkit/default_plugin/plugin_install_job_monitor.h
+++ b/webkit/default_plugin/plugin_install_job_monitor.h
@@ -21,7 +21,6 @@ class PluginInstallationJobMonitorThread :
public:
PluginInstallationJobMonitorThread();
- virtual ~PluginInstallationJobMonitorThread();
// Initializes the plugin install job. This involves creating the job object
// and starting the thread which monitors the job completion port.
@@ -62,6 +61,10 @@ class PluginInstallationJobMonitorThread :
virtual void WaitForJobThread();
private:
+ friend class base::RefCountedThreadSafe<PluginInstallationJobMonitorThread>;
+
+ virtual ~PluginInstallationJobMonitorThread();
+
// The install job completion port. Created in Init.
HANDLE install_job_completion_port_;
// Indicates that job monitoring is to be stopped
diff --git a/webkit/glue/media/buffered_data_source.h b/webkit/glue/media/buffered_data_source.h
index 6a68048..bbab6d6 100644
--- a/webkit/glue/media/buffered_data_source.h
+++ b/webkit/glue/media/buffered_data_source.h
@@ -47,7 +47,6 @@ class BufferedResourceLoader :
const GURL& url,
int64 first_byte_position,
int64 last_byte_position);
- virtual ~BufferedResourceLoader();
// Start the resource loading with the specified URL and range.
// This method operates in asynchronous mode. Once there's a response from the
@@ -120,11 +119,16 @@ class BufferedResourceLoader :
GURL GetURLForDebugging() const { return url_; }
protected:
+ friend class base::RefCountedThreadSafe<BufferedResourceLoader>;
+
// An empty constructor so mock classes can be constructed.
BufferedResourceLoader() {
}
+ virtual ~BufferedResourceLoader();
+
private:
+
// Defer the resource loading if the buffer is full.
void EnableDeferIfNeeded();
diff --git a/webkit/glue/media/buffered_data_source_unittest.cc b/webkit/glue/media/buffered_data_source_unittest.cc
index d22bcbc..f96bac1 100644
--- a/webkit/glue/media/buffered_data_source_unittest.cc
+++ b/webkit/glue/media/buffered_data_source_unittest.cc
@@ -377,7 +377,9 @@ class MockBufferedResourceLoader : public BufferedResourceLoader {
MOCK_METHOD0(GetBufferedFirstBytePosition, int64());
MOCK_METHOD0(GetBufferedLastBytePosition, int64());
- private:
+ protected:
+ ~MockBufferedResourceLoader() {}
+
DISALLOW_COPY_AND_ASSIGN(MockBufferedResourceLoader);
};
diff --git a/webkit/glue/plugins/plugin_host.h b/webkit/glue/plugins/plugin_host.h
index c306a5a..41fe0e4 100644
--- a/webkit/glue/plugins/plugin_host.h
+++ b/webkit/glue/plugins/plugin_host.h
@@ -30,7 +30,6 @@ class PluginHost : public base::RefCounted<PluginHost> {
// Access the single PluginHost instance. Callers
// must call deref() when finished with the object.
static PluginHost *Singleton();
- virtual ~PluginHost();
// The table of functions provided to the plugin.
NPNetscapeFuncs *host_functions() { return &host_funcs_; }
@@ -48,6 +47,10 @@ class PluginHost : public base::RefCounted<PluginHost> {
void PatchNPNetscapeFuncs(NPNetscapeFuncs* overrides);
private:
+ friend class base::RefCounted<PluginHost>;
+
+ virtual ~PluginHost();
+
PluginHost();
void InitializeHostFuncs();
static scoped_refptr<PluginHost> singleton_;
diff --git a/webkit/glue/plugins/plugin_instance.h b/webkit/glue/plugins/plugin_instance.h
index 385acf5..0c1687a 100644
--- a/webkit/glue/plugins/plugin_instance.h
+++ b/webkit/glue/plugins/plugin_instance.h
@@ -44,7 +44,6 @@ class PluginInstance : public base::RefCountedThreadSafe<PluginInstance> {
// Create a new instance of a plugin. The PluginInstance
// will hold a reference to the plugin.
PluginInstance(PluginLib *plugin, const std::string &mime_type);
- virtual ~PluginInstance();
// Activates the instance by calling NPP_New.
// This should be called after our instance is all
@@ -199,6 +198,10 @@ class PluginInstance : public base::RefCountedThreadSafe<PluginInstance> {
void RequestRead(NPStream* stream, NPByteRange* range_list);
private:
+ friend class base::RefCountedThreadSafe<PluginInstance>;
+
+ virtual ~PluginInstance();
+
void OnPluginThreadAsyncCall(void (*func)(void *),
void *userData);
void OnTimerCall(void (*func)(NPP id, uint32 timer_id),
diff --git a/webkit/glue/plugins/plugin_lib.h b/webkit/glue/plugins/plugin_lib.h
index e8bb44a..18efbef 100644
--- a/webkit/glue/plugins/plugin_lib.h
+++ b/webkit/glue/plugins/plugin_lib.h
@@ -28,7 +28,6 @@ class PluginInstance;
class PluginLib : public base::RefCounted<PluginLib> {
public:
static PluginLib* CreatePluginLib(const FilePath& filename);
- virtual ~PluginLib();
// Creates a WebPluginInfo structure given a plugin's path. On success
// returns true, with the information being put into "info".
@@ -77,11 +76,15 @@ class PluginLib : public base::RefCounted<PluginLib> {
int instance_count() const { return instance_count_; }
private:
+ friend class base::RefCounted<PluginLib>;
+
// Creates a new PluginLib.
// |entry_points| is non-NULL for internal plugins.
PluginLib(const WebPluginInfo& info,
const PluginEntryPoints* entry_points);
+ virtual ~PluginLib();
+
// Attempts to load the plugin from the library.
// Returns true if it is a legitimate plugin, false otherwise
bool Load();
diff --git a/webkit/glue/plugins/plugin_stream.h b/webkit/glue/plugins/plugin_stream.h
index 97bea1c..351b3a4 100644
--- a/webkit/glue/plugins/plugin_stream.h
+++ b/webkit/glue/plugins/plugin_stream.h
@@ -30,7 +30,6 @@ class PluginStream : public base::RefCounted<PluginStream> {
const char *url,
bool need_notify,
void *notify_data);
- virtual ~PluginStream();
// In case of a redirect, this can be called to update the url. But it must
// be called before Open().
@@ -81,11 +80,16 @@ class PluginStream : public base::RefCounted<PluginStream> {
void* notify_data() const { return notify_data_; }
protected:
+ friend class base::RefCounted<PluginStream>;
+
+ virtual ~PluginStream();
+
PluginInstance* instance() { return instance_.get(); }
// Check if the stream is open.
bool open() { return opened_; }
private:
+
// Open a temporary file for this stream.
// If successful, will set temp_file_name_, temp_file_handle_, and
// return true.
diff --git a/webkit/glue/plugins/plugin_string_stream.h b/webkit/glue/plugins/plugin_string_stream.h
index 0946934..68db2bf 100644
--- a/webkit/glue/plugins/plugin_string_stream.h
+++ b/webkit/glue/plugins/plugin_string_stream.h
@@ -23,13 +23,14 @@ class PluginStringStream : public PluginStream {
const GURL& url,
bool notify_needed,
void* notify_data);
- virtual ~PluginStringStream();
// Initiates the sending of data to the plugin.
void SendToPlugin(const std::string& data,
const std::string& mime_type);
private:
+ virtual ~PluginStringStream();
+
DISALLOW_COPY_AND_ASSIGN(PluginStringStream);
};
diff --git a/webkit/glue/unittest_test_server.h b/webkit/glue/unittest_test_server.h
index f0e30d9..139909e 100644
--- a/webkit/glue/unittest_test_server.h
+++ b/webkit/glue/unittest_test_server.h
@@ -33,9 +33,6 @@ class UnittestTestServer : public HTTPTestServer {
return test_server;
}
- virtual ~UnittestTestServer() {
- }
-
virtual bool MakeGETRequest(const std::string& page_name) {
GURL url(TestServerPage(page_name));
scoped_ptr<ResourceLoaderBridge> loader(
@@ -57,6 +54,9 @@ class UnittestTestServer : public HTTPTestServer {
loader->SyncLoad(&resp);
return resp.status.is_success();
}
+
+ private:
+ virtual ~UnittestTestServer() {}
};
#endif // WEBKIT_GLUE_UNITTEST_TEST_SERVER_H__
diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h
index 97c4d89..538f22b 100644
--- a/webkit/glue/webmediaplayer_impl.h
+++ b/webkit/glue/webmediaplayer_impl.h
@@ -91,7 +91,6 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
public:
Proxy(MessageLoop* render_loop,
WebMediaPlayerImpl* webmediaplayer);
- virtual ~Proxy();
// Public methods called from the video renderer.
void Repaint();
@@ -111,6 +110,10 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer,
void NetworkEventCallback();
private:
+ friend class base::RefCountedThreadSafe<Proxy>;
+
+ virtual ~Proxy();
+
// Invoke |webmediaplayer_| to perform a repaint.
void RepaintTask();
diff --git a/webkit/tools/test_shell/simple_appcache_system.cc b/webkit/tools/test_shell/simple_appcache_system.cc
index 489579f..297005a 100644
--- a/webkit/tools/test_shell/simple_appcache_system.cc
+++ b/webkit/tools/test_shell/simple_appcache_system.cc
@@ -72,6 +72,10 @@ class SimpleFrontendProxy
}
private:
+ friend class base::RefCountedThreadSafe<SimpleFrontendProxy>;
+
+ ~SimpleFrontendProxy() {}
+
SimpleAppCacheSystem* system_;
};
@@ -215,6 +219,10 @@ class SimpleBackendProxy
}
private:
+ friend class base::RefCountedThreadSafe<SimpleBackendProxy>;
+
+ ~SimpleBackendProxy() {}
+
SimpleAppCacheSystem* system_;
base::WaitableEvent event_;
bool bool_result_;
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
index d45d443..b041921 100644
--- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc
+++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
@@ -118,12 +118,6 @@ class RequestProxy : public URLRequest::Delegate,
last_upload_position_(0) {
}
- virtual ~RequestProxy() {
- // If we have a request, then we'd better be on the io thread!
- DCHECK(!request_.get() ||
- MessageLoop::current() == io_thread->message_loop());
- }
-
void DropPeer() {
peer_ = NULL;
}
@@ -144,6 +138,14 @@ class RequestProxy : public URLRequest::Delegate,
}
protected:
+ friend class base::RefCountedThreadSafe<RequestProxy>;
+
+ virtual ~RequestProxy() {
+ // If we have a request, then we'd better be on the io thread!
+ DCHECK(!request_.get() ||
+ MessageLoop::current() == io_thread->message_loop());
+ }
+
// --------------------------------------------------------------------------
// The following methods are called on the owner's thread in response to
// various URLRequest callbacks. The event hooks, defined below, trigger
@@ -583,6 +585,11 @@ class CookieSetter : public base::RefCountedThreadSafe<CookieSetter> {
DCHECK(MessageLoop::current() == io_thread->message_loop());
request_context->cookie_store()->SetCookie(url, cookie);
}
+
+ private:
+ friend class base::RefCountedThreadSafe<CookieSetter>;
+
+ ~CookieSetter() {}
};
class CookieGetter : public base::RefCountedThreadSafe<CookieGetter> {
@@ -602,6 +609,10 @@ class CookieGetter : public base::RefCountedThreadSafe<CookieGetter> {
}
private:
+ friend class base::RefCountedThreadSafe<CookieGetter>;
+
+ ~CookieGetter() {}
+
base::WaitableEvent event_;
std::string result_;
};
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 9c78b5f..1888202 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -76,8 +76,6 @@ const int kSVGTestWindowHeight = 360;
// URLRequestTestShellFileJob is used to serve the inspector
class URLRequestTestShellFileJob : public URLRequestFileJob {
public:
- virtual ~URLRequestTestShellFileJob() { }
-
static URLRequestJob* InspectorFactory(URLRequest* request,
const std::string& scheme) {
FilePath path;
@@ -92,6 +90,7 @@ class URLRequestTestShellFileJob : public URLRequestFileJob {
URLRequestTestShellFileJob(URLRequest* request, const FilePath& path)
: URLRequestFileJob(request, path) {
}
+ virtual ~URLRequestTestShellFileJob() { }
DISALLOW_COPY_AND_ASSIGN(URLRequestTestShellFileJob);
};
diff --git a/webkit/tools/test_shell/test_shell_request_context.h b/webkit/tools/test_shell/test_shell_request_context.h
index 332107f..2a1a241 100644
--- a/webkit/tools/test_shell/test_shell_request_context.h
+++ b/webkit/tools/test_shell/test_shell_request_context.h
@@ -22,11 +22,11 @@ class TestShellRequestContext : public URLRequestContext {
net::HttpCache::Mode cache_mode,
bool no_proxy);
- ~TestShellRequestContext();
-
virtual const std::string& GetUserAgent(const GURL& url) const;
private:
+ ~TestShellRequestContext();
+
void Init(const FilePath& cache_path, net::HttpCache::Mode cache_mode,
bool no_proxy);
};
diff --git a/webkit/tools/test_shell/test_web_worker.h b/webkit/tools/test_shell/test_web_worker.h
index 46595f2..4c2e077 100644
--- a/webkit/tools/test_shell/test_web_worker.h
+++ b/webkit/tools/test_shell/test_web_worker.h
@@ -78,6 +78,10 @@ class TestWebWorker : public WebKit::WebWorker,
}
private:
+ friend class base::RefCounted<TestWebWorker>;
+
+ ~TestWebWorker() {}
+
DISALLOW_COPY_AND_ASSIGN(TestWebWorker);
};