diff options
author | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-29 06:28:48 +0000 |
---|---|---|
committer | cevans@chromium.org <cevans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-29 06:28:48 +0000 |
commit | 47214d887231579c4dc8f1911539a385b7aed0fe (patch) | |
tree | df90714bb59ea64ef357f82e8d62997a535a3fe4 /content/browser/plugin_service_impl.h | |
parent | c224933cbc7e2c12a65481d951dff15b2bfccf31 (diff) | |
download | chromium_src-47214d887231579c4dc8f1911539a385b7aed0fe.zip chromium_src-47214d887231579c4dc8f1911539a385b7aed0fe.tar.gz chromium_src-47214d887231579c4dc8f1911539a385b7aed0fe.tar.bz2 |
Apply a rate limit on a per-plug-in basis to plug-in crashes.
BUG=115758
Review URL: https://chromiumcodereview.appspot.com/9460038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124139 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/plugin_service_impl.h')
-rw-r--r-- | content/browser/plugin_service_impl.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/content/browser/plugin_service_impl.h b/content/browser/plugin_service_impl.h index 602ca64..4b6976d 100644 --- a/content/browser/plugin_service_impl.h +++ b/content/browser/plugin_service_impl.h @@ -9,13 +9,16 @@ #define CONTENT_BROWSER_PLUGIN_SERVICE_IMPL_H_ #pragma once +#include <map> #include <set> +#include <vector> #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/memory/scoped_vector.h" #include "base/memory/singleton.h" #include "base/synchronization/waitable_event_watcher.h" +#include "base/time.h" #include "build/build_config.h" #include "content/browser/plugin_process_host.h" #include "content/browser/ppapi_plugin_process_host.h" @@ -94,6 +97,7 @@ class CONTENT_EXPORT PluginServiceImpl virtual void SetFilter(content::PluginServiceFilter* filter) OVERRIDE; virtual content::PluginServiceFilter* GetFilter() OVERRIDE; virtual void ForcePluginShutdown(const FilePath& plugin_path) OVERRIDE; + virtual bool IsPluginUnstable(const FilePath& plugin_path) OVERRIDE; virtual void RefreshPlugins() OVERRIDE; virtual void AddExtraPluginPath(const FilePath& path) OVERRIDE; virtual void AddExtraPluginDir(const FilePath& path) OVERRIDE; @@ -135,6 +139,9 @@ class CONTENT_EXPORT PluginServiceImpl // Cancels opening a channel to a NPAPI plugin. void CancelOpenChannelToNpapiPlugin(PluginProcessHost::Client* client); + // Used to monitor plug-in stability. + void RegisterPluginCrash(const FilePath& plugin_path); + private: friend struct DefaultSingletonTraits<PluginServiceImpl>; @@ -228,6 +235,9 @@ class CONTENT_EXPORT PluginServiceImpl scoped_refptr<PluginLoaderPosix> plugin_loader_; #endif + // Used to detect if a given plug-in is crashing over and over. + std::map<FilePath, std::vector<base::Time> > crash_times_; + DISALLOW_COPY_AND_ASSIGN(PluginServiceImpl); }; |