OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_PLUGINS_PLUGINS_FIELD_TRIAL_H_ | 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGINS_FIELD_TRIAL_H_ |
6 #define CHROME_BROWSER_PLUGINS_PLUGINS_FIELD_TRIAL_H_ | 6 #define CHROME_BROWSER_PLUGINS_PLUGINS_FIELD_TRIAL_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "components/content_settings/core/common/content_settings.h" | 9 #include "components/content_settings/core/common/content_settings.h" |
10 #include "components/content_settings/core/common/content_settings_types.h" | 10 #include "components/content_settings/core/common/content_settings_types.h" |
11 | 11 |
12 class GURL; | |
13 class HostContentSettingsMap; | |
14 | |
12 // This class manages the Plugins field trials. | 15 // This class manages the Plugins field trials. |
13 class PluginsFieldTrial { | 16 class PluginsFieldTrial { |
14 public: | 17 public: |
18 // The name of the variations parameter used for updating the amount of site | |
19 // engagement required to permit Flash. | |
20 static const char* kSiteEngagementThresholdForFlashKey; | |
21 | |
15 // Returns the effective content setting for plugins. Passes non-plugin | 22 // Returns the effective content setting for plugins. Passes non-plugin |
16 // content settings through without modification. | 23 // content settings through without modification. |
17 static ContentSetting EffectiveContentSetting(ContentSettingsType type, | 24 static ContentSetting EffectiveContentSetting(ContentSettingsType type, |
18 ContentSetting setting); | 25 ContentSetting setting); |
19 | 26 |
27 // Returns true if |url| has sufficient engagement to permit Flash based on | |
28 // the engagement in |settings|. | |
29 static bool HasSufficientEngagementForFlash(HostContentSettingsMap* settings, | |
Bernhard Bauer
2016/09/15 09:05:15
I think it would make more sense to expose the eng
dominickn
2016/09/15 12:16:00
Done.
| |
30 const GURL& url); | |
31 | |
20 private: | 32 private: |
21 DISALLOW_IMPLICIT_CONSTRUCTORS(PluginsFieldTrial); | 33 DISALLOW_IMPLICIT_CONSTRUCTORS(PluginsFieldTrial); |
22 }; | 34 }; |
23 | 35 |
24 #endif // CHROME_BROWSER_PLUGINS_PLUGINS_FIELD_TRIAL_H_ | 36 #endif // CHROME_BROWSER_PLUGINS_PLUGINS_FIELD_TRIAL_H_ |
OLD | NEW |