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

Unified Diff: chrome/browser/plugins/plugin_prefs.h

Issue 2369353002: Adds a pref and a policy to decide if PDFs should always be opened externally. (Closed)
Patch Set: Remove changes leaked in from the dependent branch. Created 4 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
« no previous file with comments | « chrome/browser/download/download_prefs_unittest.cc ('k') | chrome/browser/plugins/plugin_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/plugins/plugin_prefs.h
diff --git a/chrome/browser/plugins/plugin_prefs.h b/chrome/browser/plugins/plugin_prefs.h
index 33fe31ae5bd1ae22256a25de6c1b3d6a97f40ded..05c8159d48fcc981a916a87b1de93e1901613705 100644
--- a/chrome/browser/plugins/plugin_prefs.h
+++ b/chrome/browser/plugins/plugin_prefs.h
@@ -13,6 +13,7 @@
#include "base/macros.h"
#include "base/synchronization/lock.h"
#include "chrome/browser/plugins/plugin_finder.h"
+#include "chrome/common/chrome_content_client.h"
#include "components/keyed_service/core/refcounted_keyed_service.h"
#include "components/prefs/pref_change_registrar.h"
#include "components/prefs/pref_service.h"
@@ -107,12 +108,18 @@ class PluginPrefs : public RefcountedKeyedService {
void UpdatePatternsAndNotify(std::set<base::string16>* patterns,
const std::string& pref_name);
+ // Callback for changes to the AlwaysOpenPdfExternally policy.
+ void UpdatePdfPolicy(const std::string& pref_name);
+
// Allows unit tests to directly set enforced plugin patterns.
- void SetPolicyEnforcedPluginPatterns(
+ void SetPolicyEnforcedPluginPatternsForTests(
const std::set<base::string16>& disabled_patterns,
const std::set<base::string16>& disabled_exception_patterns,
const std::set<base::string16>& enabled_patterns);
+ // Allows unit tests to directly set the AlwaysOpenPdfExternally pref.
+ void SetAlwaysOpenPdfExternallyForTests(bool always_open_pdf_externally);
+
// Callback for after the plugin groups have been loaded.
void EnablePluginGroupInternal(
bool enabled,
@@ -147,6 +154,7 @@ class PluginPrefs : public RefcountedKeyedService {
std::set<base::string16> policy_disabled_plugin_patterns_;
std::set<base::string16> policy_disabled_plugin_exception_patterns_;
std::set<base::string16> policy_enabled_plugin_patterns_;
+ bool always_open_pdf_externally_;
// Weak pointer, owns us. Only used as a notification source.
Profile* profile_;
« no previous file with comments | « chrome/browser/download/download_prefs_unittest.cc ('k') | chrome/browser/plugins/plugin_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698