diff options
author | rdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-12 20:54:13 +0000 |
---|---|---|
committer | rdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-12 20:54:13 +0000 |
commit | 6d8a0b0937f27a61a84bc7d19bc7c689a714aa45 (patch) | |
tree | 157bfbb0a910e6f4246b3e4a28050d7db941b7df /extensions/browser/pref_names.h | |
parent | 586d6f15802e4f1a873b2d0709d1b5f32da2bc7f (diff) | |
download | chromium_src-6d8a0b0937f27a61a84bc7d19bc7c689a714aa45.zip chromium_src-6d8a0b0937f27a61a84bc7d19bc7c689a714aa45.tar.gz chromium_src-6d8a0b0937f27a61a84bc7d19bc7c689a714aa45.tar.bz2 |
Move Extension-Controlled Preference functions from ExtPrefs to PreferenceAPI
Move [Set|Remove]ExtensionControlledPref and [Can|Does]ExtensionControlPref
functions from ExtensionPrefs to PreferenceAPI, since these functions were only
ever used in APIs.
This required restructing the ExtensionPrefs unittests slightly, so that derived
testing classes (tests for ExtensionSorting) don't inherit controlled pref
methods, and the functions are isolated in APIs.
BUG=180083
Review URL: https://chromiumcodereview.appspot.com/15582003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205924 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/browser/pref_names.h')
-rw-r--r-- | extensions/browser/pref_names.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/extensions/browser/pref_names.h b/extensions/browser/pref_names.h new file mode 100644 index 0000000..f70b525 --- /dev/null +++ b/extensions/browser/pref_names.h @@ -0,0 +1,42 @@ +// Copyright 2013 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef EXTENSIONS_BROWSER_PREF_NAMES_H_ +#define EXTENSIONS_BROWSER_PREF_NAMES_H_ + +#include <string> + +#include "extensions/browser/extension_prefs_scope.h" + +namespace extensions { + +// Preference keys which are needed by both the ExtensionPrefs and by external +// clients, such as APIs. +namespace pref_names { + +// If the given |scope| is persisted, return true and populate |result| with the +// appropriate pref name. If |scope| is not persisted, return false, and leave +// |result| unchanged. +bool ScopeToPrefName(ExtensionPrefsScope scope, std::string* result); + +// A preference that contains any extension-controlled preferences. +extern const char kPrefPreferences[]; + +// A preference that contains any extension-controlled incognito preferences. +extern const char kPrefIncognitoPreferences[]; + +// A preference that contains any extension-controlled regular-only preferences. +extern const char kPrefRegularOnlyPreferences[]; + +// A preference that contains extension-set content settings. +extern const char kPrefContentSettings[]; + +// A preference that contains extension-set content settings. +extern const char kPrefIncognitoContentSettings[]; + +} // namespace pref_names + +} // namespace extensions + +#endif // EXTENSIONS_BROWSER_PREF_NAMES_H_ |