1 // Copyright 2020 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef EXTENSIONS_BROWSER_PREF_TYPES_H_
6 #define EXTENSIONS_BROWSER_PREF_TYPES_H_
7 
8 #include <string>
9 
10 namespace extensions {
11 
12 enum PrefType {
13   kBool,
14   kString,
15   kInteger,
16   // TODO(archanasimha): implement Get/SetAsX for the following PrefTypes.
17   kGURL,
18   kList,
19   kDictionary,
20   //  kExtensionIdList,
21   //  kPermissionSet,
22   kTime
23 };
24 
25 // PrefScope indicates whether an ExtensionPref is profile wide or specific to
26 // an extension. Extension-specific prefs are keyed under a dictionary with the
27 // extension ID and are removed when an extension is uninstalled.
28 enum class PrefScope { kProfile, kExtensionSpecific };
29 
30 struct PrefMap {
31   const char* name;
32   PrefType type;
33   PrefScope scope;
34 };
35 
36 extern const PrefMap kCorruptedDisableCount;
37 
38 }  // namespace extensions
39 
40 #endif  // EXTENSIONS_BROWSER_PREF_TYPES_H_
41