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

Unified Diff: extensions/browser/extension_message_filter.h

Issue 309123002: extensions: Destroy ExtensionMessageFilter on IO thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: apply review feedback Created 6 years, 7 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 | « no previous file | extensions/browser/extension_message_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_message_filter.h
diff --git a/extensions/browser/extension_message_filter.h b/extensions/browser/extension_message_filter.h
index 330579464d3bd3cbc3546e04f081b55480050d01..1ed785e5c8dea4695d1a223fab89687a59b087a7 100644
--- a/extensions/browser/extension_message_filter.h
+++ b/extensions/browser/extension_message_filter.h
@@ -38,12 +38,16 @@ class ExtensionMessageFilter : public content::BrowserMessageFilter {
int render_process_id() { return render_process_id_; }
private:
+ friend class content::BrowserThread;
+ friend class base::DeleteHelper<ExtensionMessageFilter>;
+
virtual ~ExtensionMessageFilter();
// content::BrowserMessageFilter implementation.
virtual void OverrideThreadForMessage(
const IPC::Message& message,
content::BrowserThread::ID* thread) OVERRIDE;
+ virtual void OnDestruct() const OVERRIDE;
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
// Message handlers on the UI thread.
@@ -82,6 +86,7 @@ class ExtensionMessageFilter : public content::BrowserMessageFilter {
scoped_refptr<extensions::InfoMap> extension_info_map_;
+ // Weak pointers produced by this factory are bound to the IO thread.
base::WeakPtrFactory<ExtensionMessageFilter> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(ExtensionMessageFilter);
« no previous file with comments | « no previous file | extensions/browser/extension_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698