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

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

Issue 12079044: Fix enable state of Pepper Flash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/plugins/plugin_prefs.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_PLUGIN_PREFS_H_ 5 #ifndef CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_H_
6 #define CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_H_ 6 #define CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // some plugins in sync with each other. 92 // some plugins in sync with each other.
93 class PluginState { 93 class PluginState {
94 public: 94 public:
95 PluginState(); 95 PluginState();
96 ~PluginState(); 96 ~PluginState();
97 97
98 // Returns whether |plugin| is found. If |plugin| cannot be found, 98 // Returns whether |plugin| is found. If |plugin| cannot be found,
99 // |*enabled| won't be touched. 99 // |*enabled| won't be touched.
100 bool Get(const FilePath& plugin, bool* enabled) const; 100 bool Get(const FilePath& plugin, bool* enabled) const;
101 void Set(const FilePath& plugin, bool enabled); 101 void Set(const FilePath& plugin, bool enabled);
102 // It is similar to Set(), except that it does nothing if |plugin| needs to
103 // be converted to a different key.
104 void SetIgnorePseudoKey(const FilePath& plugin, bool enabled);
105 102
106 private: 103 private:
107 FilePath ConvertMapKey(const FilePath& plugin) const; 104 FilePath ConvertMapKey(const FilePath& plugin) const;
108 105
109 std::map<FilePath, bool> state_; 106 std::map<FilePath, bool> state_;
110 }; 107 };
111 108
112 virtual ~PluginPrefs(); 109 virtual ~PluginPrefs();
113 110
114 // Called to update one of the policy_xyz patterns below when a 111 // Called to update one of the policy_xyz patterns below when a
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // PluginList to use for testing. If this is NULL, defaults to the global 170 // PluginList to use for testing. If this is NULL, defaults to the global
174 // singleton. 171 // singleton.
175 webkit::npapi::PluginList* plugin_list_; 172 webkit::npapi::PluginList* plugin_list_;
176 173
177 PrefChangeRegistrar registrar_; 174 PrefChangeRegistrar registrar_;
178 175
179 DISALLOW_COPY_AND_ASSIGN(PluginPrefs); 176 DISALLOW_COPY_AND_ASSIGN(PluginPrefs);
180 }; 177 };
181 178
182 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_H_ 179 #endif // CHROME_BROWSER_PLUGINS_PLUGIN_PREFS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/plugins/plugin_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698