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

Side by Side Diff: chrome/browser/extensions/extension_pref_value_map.h

Issue 7067040: Enable incognito_session_only preferences (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 9 years, 7 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_EXTENSIONS_EXTENSION_PREF_VALUE_MAP_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREF_VALUE_MAP_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREF_VALUE_MAP_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREF_VALUE_MAP_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 // Returns true if currently no extension with higher precedence controls the 83 // Returns true if currently no extension with higher precedence controls the
84 // preference. 84 // preference.
85 // Note that the this function does does not consider the existence of 85 // Note that the this function does does not consider the existence of
86 // policies. An extension is only really able to control a preference if 86 // policies. An extension is only really able to control a preference if
87 // PrefService::Preference::IsExtensionModifiable() returns true as well. 87 // PrefService::Preference::IsExtensionModifiable() returns true as well.
88 bool CanExtensionControlPref(const std::string& extension_id, 88 bool CanExtensionControlPref(const std::string& extension_id,
89 const std::string& pref_key, 89 const std::string& pref_key,
90 bool incognito) const; 90 bool incognito) const;
91 91
92 // Removes all "incognito session only" preference values.
93 void ClearAllIncognitoSessionOnlyPreferences();
94
92 // Returns true if an extension identified by |extension_id| controls the 95 // Returns true if an extension identified by |extension_id| controls the
93 // preference. This means this extension has set a preference value and no 96 // preference. This means this extension has set a preference value and no
94 // other extension with higher precedence overrides it. 97 // other extension with higher precedence overrides it.
95 // Note that the this function does does not consider the existence of 98 // Note that the this function does does not consider the existence of
96 // policies. An extension is only really able to control a preference if 99 // policies. An extension is only really able to control a preference if
97 // PrefService::Preference::IsExtensionModifiable() returns true as well. 100 // PrefService::Preference::IsExtensionModifiable() returns true as well.
98 bool DoesExtensionControlPref(const std::string& extension_id, 101 bool DoesExtensionControlPref(const std::string& extension_id,
99 const std::string& pref_key, 102 const std::string& pref_key,
100 bool incognito) const; 103 bool incognito) const;
101 104
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 // preferences values (i.e. the ones with the highest precedence) 162 // preferences values (i.e. the ones with the highest precedence)
160 // are stored in ExtensionPrefStores. 163 // are stored in ExtensionPrefStores.
161 ExtensionEntryMap entries_; 164 ExtensionEntryMap entries_;
162 165
163 ObserverList<Observer, true> observers_; 166 ObserverList<Observer, true> observers_;
164 167
165 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefValueMap); 168 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefValueMap);
166 }; 169 };
167 170
168 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREF_VALUE_MAP_H_ 171 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREF_VALUE_MAP_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_content_settings_apitest.cc ('k') | chrome/browser/extensions/extension_pref_value_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698