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

Side by Side Diff: chrome/browser/plugins/plugin_utils.h

Issue 2378573005: [HBD] Blanket BLOCK on all non-HTTP(s) and non-FILE URLs for Flash. (Closed)
Patch Set: fix dat merge 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_PLUGIN_UTILS_H_ 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_UTILS_H_
6 #define CHROME_BROWSER_PLUGINS_PLUGIN_UTILS_H_ 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_UTILS_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 10
11 class GURL; 11 class GURL;
12 class HostContentSettingsMap; 12 class HostContentSettingsMap;
13 13
14 namespace content { 14 namespace content {
15 struct WebPluginInfo; 15 struct WebPluginInfo;
16 } 16 }
17 17
18 namespace url {
19 class Origin;
20 }
21
18 class PluginUtils { 22 class PluginUtils {
19 public: 23 public:
20 // |is_default| and |is_managed| may be nullptr. In that case, they aren't 24 // |is_default| and |is_managed| may be nullptr. In that case, they aren't
21 // set. 25 // set.
22 static void GetPluginContentSetting( 26 static void GetPluginContentSetting(
23 const HostContentSettingsMap* host_content_settings_map, 27 const HostContentSettingsMap* host_content_settings_map,
24 const content::WebPluginInfo& plugin, 28 const content::WebPluginInfo& plugin,
25 const GURL& policy_url, 29 const url::Origin& main_frame_origin,
26 const GURL& plugin_url, 30 const GURL& plugin_url,
27 const std::string& resource, 31 const std::string& resource,
28 ContentSetting* setting, 32 ContentSetting* setting,
29 bool* is_default, 33 bool* is_default,
30 bool* is_managed); 34 bool* is_managed);
31 35
32 // Returns the content setting for Flash. This is the same as 36 // Returns the content setting for Flash. This is the same as
33 // |GetPluginContentSetting| but flash-specific. 37 // |GetPluginContentSetting| but flash-specific.
34 static ContentSetting GetFlashPluginContentSetting( 38 static ContentSetting GetFlashPluginContentSetting(
35 const HostContentSettingsMap* host_content_settings_map, 39 const HostContentSettingsMap* host_content_settings_map,
36 const GURL& policy_url, 40 const url::Origin& main_frame_origin,
37 const GURL& plugin_url, 41 const GURL& plugin_url,
38 bool* is_managed); 42 bool* is_managed);
39 43
40 private: 44 private:
41 DISALLOW_IMPLICIT_CONSTRUCTORS(PluginUtils); 45 DISALLOW_IMPLICIT_CONSTRUCTORS(PluginUtils);
42 }; 46 };
43 47
44 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_UTILS_H_ 48 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/plugins/plugin_info_message_filter_unittest.cc ('k') | chrome/browser/plugins/plugin_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698