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

Unified Diff: chrome/browser/plugin_data_remover_helper.h

Issue 5278001: Add a preference to clear Flash LSO data in the Clear Browsing Data dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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
Index: chrome/browser/plugin_data_remover_helper.h
diff --git a/chrome/browser/plugin_data_remover_helper.h b/chrome/browser/plugin_data_remover_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..aaf25e402a775584f484930153d7f8bed7e15727
--- /dev/null
+++ b/chrome/browser/plugin_data_remover_helper.h
@@ -0,0 +1,42 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PLUGIN_DATA_REMOVER_HELPER_H_
+#define CHROME_BROWSER_PLUGIN_DATA_REMOVER_HELPER_H_
+#pragma once
+
+#include "base/ref_counted.h"
+#include "chrome/browser/prefs/pref_member.h"
+
+class Profile;
+
+// Helper class modeled after BooleanPrefMember to (asynchronously) update
+// the preference specifying whether clearing plug-in data is supported
+// by an installed plug-in.
+// It should only be used from the UI thread. The client has to make sure that
+// the passed PrefService outlives this object.
+
jochen (gone - plz use gerrit) 2010/11/24 19:03:07 no empty line
Bernhard Bauer 2010/11/29 10:45:23 Done.
+class PluginDataRemoverHelper {
+ public:
+ PluginDataRemoverHelper();
+ ~PluginDataRemoverHelper();
+
+ // Binds this object to the |pref_name| preference in |prefs|, notifying
+ // |observer| if the value changes.
+ // This fires off a request to the NPAPI::PluginList (via PluginDataRemover)
+ // on the FILE thread to get the list of installed plug-ins.
+ void Init(const char* pref_name,
+ PrefService* prefs,
+ NotificationObserver* observer);
+
+ bool GetValue() const { return pref_.GetValue(); }
+
+ private:
+ class Internal;
+
+ BooleanPrefMember pref_;
+ scoped_refptr<Internal> internal_;
+};
jochen (gone - plz use gerrit) 2010/11/24 19:03:07 disallow copy and assign
Bernhard Bauer 2010/11/29 10:45:23 Done.
+
+#endif // CHROME_BROWSER_PLUGIN_DATA_REMOVER_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698