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

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

Issue 624173002: replace OVERRIDE and FINAL with override and final in chrome/browser/[j-q]* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master Created 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CHROME_PLUGIN_SERVICE_FILTER_H_ 5 #ifndef CHROME_BROWSER_PLUGINS_CHROME_PLUGIN_SERVICE_FILTER_H_
6 #define CHROME_BROWSER_PLUGINS_CHROME_PLUGIN_SERVICE_FILTER_H_ 6 #define CHROME_BROWSER_PLUGINS_CHROME_PLUGIN_SERVICE_FILTER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // Returns whether the plugin is found in restricted_plugins_. 70 // Returns whether the plugin is found in restricted_plugins_.
71 bool IsPluginRestricted(const base::FilePath& plugin_path); 71 bool IsPluginRestricted(const base::FilePath& plugin_path);
72 72
73 // PluginServiceFilter implementation: 73 // PluginServiceFilter implementation:
74 virtual bool IsPluginAvailable( 74 virtual bool IsPluginAvailable(
75 int render_process_id, 75 int render_process_id,
76 int render_frame_id, 76 int render_frame_id,
77 const void* context, 77 const void* context,
78 const GURL& url, 78 const GURL& url,
79 const GURL& policy_url, 79 const GURL& policy_url,
80 content::WebPluginInfo* plugin) OVERRIDE; 80 content::WebPluginInfo* plugin) override;
81 81
82 // CanLoadPlugin always grants permission to the browser 82 // CanLoadPlugin always grants permission to the browser
83 // (render_process_id == 0) 83 // (render_process_id == 0)
84 virtual bool CanLoadPlugin( 84 virtual bool CanLoadPlugin(
85 int render_process_id, 85 int render_process_id,
86 const base::FilePath& path) OVERRIDE; 86 const base::FilePath& path) override;
87 87
88 private: 88 private:
89 friend struct DefaultSingletonTraits<ChromePluginServiceFilter>; 89 friend struct DefaultSingletonTraits<ChromePluginServiceFilter>;
90 90
91 struct OverriddenPlugin { 91 struct OverriddenPlugin {
92 OverriddenPlugin(); 92 OverriddenPlugin();
93 ~OverriddenPlugin(); 93 ~OverriddenPlugin();
94 94
95 int render_frame_id; 95 int render_frame_id;
96 GURL url; // If empty, the override applies to all urls in render_frame. 96 GURL url; // If empty, the override applies to all urls in render_frame.
97 content::WebPluginInfo plugin; 97 content::WebPluginInfo plugin;
98 }; 98 };
99 99
100 struct ProcessDetails { 100 struct ProcessDetails {
101 ProcessDetails(); 101 ProcessDetails();
102 ~ProcessDetails(); 102 ~ProcessDetails();
103 103
104 std::vector<OverriddenPlugin> overridden_plugins; 104 std::vector<OverriddenPlugin> overridden_plugins;
105 std::set<base::FilePath> authorized_plugins; 105 std::set<base::FilePath> authorized_plugins;
106 }; 106 };
107 107
108 ChromePluginServiceFilter(); 108 ChromePluginServiceFilter();
109 virtual ~ChromePluginServiceFilter(); 109 virtual ~ChromePluginServiceFilter();
110 110
111 // content::NotificationObserver implementation: 111 // content::NotificationObserver implementation:
112 virtual void Observe(int type, 112 virtual void Observe(int type,
113 const content::NotificationSource& source, 113 const content::NotificationSource& source,
114 const content::NotificationDetails& details) OVERRIDE; 114 const content::NotificationDetails& details) override;
115 115
116 ProcessDetails* GetOrRegisterProcess(int render_process_id); 116 ProcessDetails* GetOrRegisterProcess(int render_process_id);
117 const ProcessDetails* GetProcess(int render_process_id) const; 117 const ProcessDetails* GetProcess(int render_process_id) const;
118 118
119 content::NotificationRegistrar registrar_; 119 content::NotificationRegistrar registrar_;
120 120
121 base::Lock lock_; // Guards access to member variables. 121 base::Lock lock_; // Guards access to member variables.
122 // Map of plugin paths to the origin they are restricted to. 122 // Map of plugin paths to the origin they are restricted to.
123 typedef std::pair<const void*, GURL> RestrictedPluginPair; 123 typedef std::pair<const void*, GURL> RestrictedPluginPair;
124 typedef base::hash_map<base::FilePath, 124 typedef base::hash_map<base::FilePath,
125 RestrictedPluginPair> RestrictedPluginMap; 125 RestrictedPluginPair> RestrictedPluginMap;
126 RestrictedPluginMap restricted_plugins_; 126 RestrictedPluginMap restricted_plugins_;
127 typedef std::map<const void*, scoped_refptr<PluginPrefs> > ResourceContextMap; 127 typedef std::map<const void*, scoped_refptr<PluginPrefs> > ResourceContextMap;
128 ResourceContextMap resource_context_map_; 128 ResourceContextMap resource_context_map_;
129 129
130 std::map<int, ProcessDetails> plugin_details_; 130 std::map<int, ProcessDetails> plugin_details_;
131 }; 131 };
132 132
133 #endif // CHROME_BROWSER_PLUGINS_CHROME_PLUGIN_SERVICE_FILTER_H_ 133 #endif // CHROME_BROWSER_PLUGINS_CHROME_PLUGIN_SERVICE_FILTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/pepper_flash_settings_manager.cc ('k') | chrome/browser/plugins/plugin_info_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698