diff options
author | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-25 23:37:03 +0000 |
---|---|---|
committer | yzshen@chromium.org <yzshen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-25 23:37:03 +0000 |
commit | 18a4d63c81815814947e8dd6b99cf9cbafa02733 (patch) | |
tree | 1e11ea66d886befbbe16d580a12497105612aadf /chrome/browser/plugin_data_remover_helper.h | |
parent | 1b00bfba5936ffecd9afdeff2ebd059905181bdd (diff) | |
download | chromium_src-18a4d63c81815814947e8dd6b99cf9cbafa02733.zip chromium_src-18a4d63c81815814947e8dd6b99cf9cbafa02733.tar.gz chromium_src-18a4d63c81815814947e8dd6b99cf9cbafa02733.tar.bz2 |
Pepper Flash settings integration: add UI for "deauthorize content licenses".
This CL adds to the "Clear browsing data" dialog a checkbox, which will only show up when Pepper Flash is in use.
BUG=112190
TEST=None
Review URL: https://chromiumcodereview.appspot.com/10387161
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139153 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/plugin_data_remover_helper.h')
-rw-r--r-- | chrome/browser/plugin_data_remover_helper.h | 55 |
1 files changed, 3 insertions, 52 deletions
diff --git a/chrome/browser/plugin_data_remover_helper.h b/chrome/browser/plugin_data_remover_helper.h index 938b17c..2b207d7 100644 --- a/chrome/browser/plugin_data_remover_helper.h +++ b/chrome/browser/plugin_data_remover_helper.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -6,62 +6,13 @@ #define CHROME_BROWSER_PLUGIN_DATA_REMOVER_HELPER_H_ #pragma once -#include <vector> - -#include "base/memory/ref_counted.h" -#include "base/memory/weak_ptr.h" -#include "chrome/browser/prefs/pref_member.h" -#include "content/public/browser/notification_observer.h" -#include "content/public/browser/notification_registrar.h" - class PluginPrefs; -class Profile; - -namespace webkit { -struct WebPluginInfo; -} -// 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 profile outlives this object. -class PluginDataRemoverHelper : public content::NotificationObserver { +class PluginDataRemoverHelper { public: - PluginDataRemoverHelper(); - virtual ~PluginDataRemoverHelper(); - - // Binds this object to the |pref_name| preference in the profile's - // PrefService, notifying |observer| if the value changes. - // This asynchronously calls the PluginService to get the list of installed - // plug-ins. - void Init(const char* pref_name, - Profile* profile, - content::NotificationObserver* observer); - - bool GetValue() const { return pref_.GetValue(); } - // Like PluginDataRemover::IsSupported, but checks that the returned plugin - // is enabled by PluginPrefs + // is enabled by PluginPrefs. static bool IsSupported(PluginPrefs* plugin_prefs); - - // content::NotificationObserver methods: - virtual void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) OVERRIDE; - - private: - void StartUpdate(); - void GotPlugins(scoped_refptr<PluginPrefs> plugin_prefs, - const std::vector<webkit::WebPluginInfo>& plugins); - - BooleanPrefMember pref_; - content::NotificationRegistrar registrar_; - // Weak pointer. - Profile* profile_; - base::WeakPtrFactory<PluginDataRemoverHelper> factory_; - - DISALLOW_COPY_AND_ASSIGN(PluginDataRemoverHelper); }; #endif // CHROME_BROWSER_PLUGIN_DATA_REMOVER_HELPER_H_ |