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

Unified Diff: chrome/browser/plugins/plugin_info_message_filter.h

Issue 2540253002: Fix heap use-after-free in PrintingMessageFilter (Closed)
Patch Set: Fix compile error Created 4 years 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/plugins/plugin_info_message_filter.h
diff --git a/chrome/browser/plugins/plugin_info_message_filter.h b/chrome/browser/plugins/plugin_info_message_filter.h
index 3a53837d2d1b13511cebb4cf76604d7f33b65fb1..67a851f5db54bd3c7af6d0dba6a2df4b4e7aa34e 100644
--- a/chrome/browser/plugins/plugin_info_message_filter.h
+++ b/chrome/browser/plugins/plugin_info_message_filter.h
@@ -17,6 +17,7 @@
#include "chrome/browser/plugins/plugin_metadata.h"
#include "chrome/browser/plugins/plugin_prefs.h"
#include "components/content_settings/core/common/content_settings.h"
+#include "components/keyed_service/core/keyed_service_shutdown_notifier.h"
#include "components/prefs/pref_member.h"
#include "content/public/browser/browser_message_filter.h"
#include "extensions/features/features.h"
@@ -81,6 +82,7 @@ class PluginInfoMessageFilter : public content::BrowserMessageFilter {
const base::FilePath& path) const;
bool IsPluginEnabled(const content::WebPluginInfo& plugin) const;
+ void ShutdownOnUIThread();
private:
int render_process_id_;
content::ResourceContext* resource_context_;
@@ -105,6 +107,7 @@ class PluginInfoMessageFilter : public content::BrowserMessageFilter {
content::BrowserThread::UI>;
friend class base::DeleteHelper<PluginInfoMessageFilter>;
+ void ShutdownOnUIThread();
~PluginInfoMessageFilter() override;
void OnGetPluginInfo(int render_frame_id,
@@ -148,6 +151,8 @@ class PluginInfoMessageFilter : public content::BrowserMessageFilter {
#endif
Context context_;
+ std::unique_ptr<KeyedServiceShutdownNotifier::Subscription>
+ shutdown_notifier_;
scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
base::WeakPtrFactory<PluginInfoMessageFilter> weak_ptr_factory_;

Powered by Google App Engine
This is Rietveld 408576698