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

Unified Diff: chrome/browser/plugin_data_remover_helper.cc

Issue 8071013: Finish moving plugin probing out of process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for review Created 9 years, 2 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
Index: chrome/browser/plugin_data_remover_helper.cc
diff --git a/chrome/browser/plugin_data_remover_helper.cc b/chrome/browser/plugin_data_remover_helper.cc
index d3ad02ab486cdd7bf3e9903cc6343f9def6297ec..c41421bd49195334bf1cca482f183101ef20ef8c 100644
--- a/chrome/browser/plugin_data_remover_helper.cc
+++ b/chrome/browser/plugin_data_remover_helper.cc
@@ -7,6 +7,7 @@
#include <string>
#include "base/bind.h"
+#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "chrome/browser/plugin_data_remover.h"
#include "chrome/browser/plugin_prefs.h"
@@ -14,6 +15,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/browser_thread.h"
+#include "content/browser/plugin_service.h"
#include "content/common/notification_service.h"
// The internal class is refcounted so it can outlive PluginDataRemoverHelper.
Bernhard Bauer 2011/10/05 13:00:46 If we're doing everything on the UI thread now, th
Robert Sesek 2011/10/05 18:27:16 Done.
@@ -24,12 +26,9 @@ class PluginDataRemoverHelper::Internal
: pref_name_(pref_name), profile_(profile) {}
void StartUpdate() {
- BrowserThread::PostTask(
- BrowserThread::FILE,
- FROM_HERE,
- base::Bind(&PluginDataRemoverHelper::Internal::UpdateOnFileThread,
- this,
- make_scoped_refptr(PluginPrefs::GetForProfile(profile_))));
+ PluginService::GetInstance()->GetPlugins(
+ base::Bind(&PluginDataRemoverHelper::Internal::GotPlugins, this,
+ make_scoped_refptr(PluginPrefs::GetForProfile(profile_))));
}
void Invalidate() {
@@ -41,8 +40,8 @@ class PluginDataRemoverHelper::Internal
~Internal() {}
- void UpdateOnFileThread(scoped_refptr<PluginPrefs> plugin_prefs) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
+ void GotPlugins(scoped_refptr<PluginPrefs> plugin_prefs,
+ const std::vector<webkit::WebPluginInfo>& plugins) {
bool result = PluginDataRemover::IsSupported(plugin_prefs);
BrowserThread::PostTask(
BrowserThread::UI,

Powered by Google App Engine
This is Rietveld 408576698