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

Unified Diff: content/browser/plugin_loader_posix.h

Issue 128773002: Restart plugin loading only if the plugin list has actually become stale. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 years, 11 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 | « chrome/browser/plugins/plugin_prefs_unittest.cc ('k') | content/browser/plugin_loader_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/plugin_loader_posix.h
diff --git a/content/browser/plugin_loader_posix.h b/content/browser/plugin_loader_posix.h
index 60cd5c61221ccc3804af2a4bd84c3a08a4959cf5..42c6437bde24841e26b309e2f90b89b1515ca75c 100644
--- a/content/browser/plugin_loader_posix.h
+++ b/content/browser/plugin_loader_posix.h
@@ -5,7 +5,6 @@
#ifndef CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_
#define CONTENT_BROWSER_PLUGIN_LOADER_POSIX_H_
-#include <deque>
#include <vector>
#include "base/basictypes.h"
@@ -51,10 +50,9 @@ class CONTENT_EXPORT PluginLoaderPosix
public:
PluginLoaderPosix();
- // Must be called from the IO thread.
- void LoadPlugins(
- scoped_refptr<base::MessageLoopProxy> target_loop,
- const PluginService::GetPluginsCallback& callback);
+ // Must be called from the IO thread. The |callback| will be called on the IO
+ // thread too.
+ void GetPlugins(const PluginService::GetPluginsCallback& callback);
// UtilityProcessHostClient:
virtual void OnProcessCrashed(int exit_code) OVERRIDE;
@@ -64,15 +62,6 @@ class CONTENT_EXPORT PluginLoaderPosix
virtual bool Send(IPC::Message* msg) OVERRIDE;
private:
- struct PendingCallback {
- PendingCallback(scoped_refptr<base::MessageLoopProxy> target_loop,
- const PluginService::GetPluginsCallback& callback);
- ~PendingCallback();
-
- scoped_refptr<base::MessageLoopProxy> target_loop;
- PluginService::GetPluginsCallback callback;
- };
-
virtual ~PluginLoaderPosix();
// Called on the FILE thread to get the list of plugin paths to probe.
@@ -81,6 +70,12 @@ class CONTENT_EXPORT PluginLoaderPosix
// Must be called on the IO thread.
virtual void LoadPluginsInternal();
+ // Called after plugin loading has finished, if we don't know whether the
+ // plugin list has been invalidated in the mean time.
+ void GetPluginsWrapper(
+ const PluginService::GetPluginsCallback& callback,
+ const std::vector<WebPluginInfo>& plugins_unused);
+
// Message handlers.
void OnPluginLoaded(uint32 index, const WebPluginInfo& plugin);
void OnPluginLoadFailed(uint32 index, const base::FilePath& plugin_path);
@@ -113,7 +108,7 @@ class CONTENT_EXPORT PluginLoaderPosix
// The callback and message loop on which the callback will be run when the
// plugin loading process has been completed.
- std::deque<PendingCallback> callbacks_;
+ std::vector<PluginService::GetPluginsCallback> callbacks_;
// The time at which plugin loading started.
base::TimeTicks load_start_time_;
« no previous file with comments | « chrome/browser/plugins/plugin_prefs_unittest.cc ('k') | content/browser/plugin_loader_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698