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

Unified Diff: chrome/browser/plugin_data_remover_helper.cc

Issue 8590016: Move the PluginDataRemover class to content, and remove the chrome pieces from it. This class rea... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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/plugin_data_remover_helper.h ('k') | chrome/browser/ui/webui/workers_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugin_data_remover_helper.cc
===================================================================
--- chrome/browser/plugin_data_remover_helper.cc (revision 110324)
+++ chrome/browser/plugin_data_remover_helper.cc (working copy)
@@ -7,7 +7,6 @@
#include <string>
#include "base/bind.h"
-#include "chrome/browser/plugin_data_remover.h"
#include "chrome/browser/plugin_prefs.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
@@ -15,6 +14,7 @@
#include "content/browser/plugin_service.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_source.h"
+#include "content/public/browser/plugin_data_remover.h"
using content::BrowserThread;
@@ -35,6 +35,13 @@
StartUpdate();
}
+// static
+bool PluginDataRemoverHelper::IsSupported(PluginPrefs* plugin_prefs) {
+ webkit::WebPluginInfo plugin;
+ return content::PluginDataRemover::IsSupported(&plugin) &&
+ plugin_prefs->IsPluginEnabled(plugin);
+}
+
void PluginDataRemoverHelper::Observe(
int type,
const content::NotificationSource& source,
@@ -56,7 +63,7 @@
scoped_refptr<PluginPrefs> plugin_prefs,
const std::vector<webkit::WebPluginInfo>& plugins) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- bool supported = PluginDataRemover::IsSupported(plugin_prefs);
+ bool supported = IsSupported(plugin_prefs);
// Set the value on the PrefService instead of through the PrefMember to
// notify observers if it changed.
profile_->GetPrefs()->SetBoolean(pref_.GetPrefName().c_str(), supported);
« no previous file with comments | « chrome/browser/plugin_data_remover_helper.h ('k') | chrome/browser/ui/webui/workers_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698