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

Side by Side Diff: extensions/common/extension.h

Issue 2004043002: Supervised Users Initiated Installs v2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@kid_initiated_install
Patch Set: Style fix Created 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 EXTENSIONS_COMMON_EXTENSION_H_ 5 #ifndef EXTENSIONS_COMMON_EXTENSION_H_
6 #define EXTENSIONS_COMMON_EXTENSION_H_ 6 #define EXTENSIONS_COMMON_EXTENSION_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <set> 10 #include <set>
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // DEPRECATED: Special state for component extensions. 58 // DEPRECATED: Special state for component extensions.
59 // Maintained as a placeholder since states may be stored to disk. 59 // Maintained as a placeholder since states may be stored to disk.
60 ENABLED_COMPONENT_DEPRECATED, 60 ENABLED_COMPONENT_DEPRECATED,
61 // Add new states here as this enum is stored in prefs. 61 // Add new states here as this enum is stored in prefs.
62 NUM_STATES 62 NUM_STATES
63 }; 63 };
64 64
65 // Reasons an extension may be disabled. These are used in histograms, so do 65 // Reasons an extension may be disabled. These are used in histograms, so do
66 // not remove/reorder entries - only add at the end just before 66 // not remove/reorder entries - only add at the end just before
67 // DISABLE_REASON_LAST (and update the shift value for it). Also remember to 67 // DISABLE_REASON_LAST (and update the shift value for it). Also remember to
68 // update the enum listing in tools/metrics/histograms.xml. 68 // update the enum listing in tools/metrics/histograms/histograms.xml.
69 // Also carefully consider if your reason should sync to other devices, and if 69 // Also carefully consider if your reason should sync to other devices, and if
70 // so, add it to kKnownSyncableDisableReasons in extension_sync_service.cc. 70 // so, add it to kKnownSyncableDisableReasons in extension_sync_service.cc.
71 enum DisableReason { 71 enum DisableReason {
72 DISABLE_NONE = 0, 72 DISABLE_NONE = 0,
73 DISABLE_USER_ACTION = 1 << 0, 73 DISABLE_USER_ACTION = 1 << 0,
74 DISABLE_PERMISSIONS_INCREASE = 1 << 1, 74 DISABLE_PERMISSIONS_INCREASE = 1 << 1,
75 DISABLE_RELOAD = 1 << 2, 75 DISABLE_RELOAD = 1 << 2,
76 DISABLE_UNSUPPORTED_REQUIREMENT = 1 << 3, 76 DISABLE_UNSUPPORTED_REQUIREMENT = 1 << 3,
77 DISABLE_SIDELOAD_WIPEOUT = 1 << 4, 77 DISABLE_SIDELOAD_WIPEOUT = 1 << 4,
78 DEPRECATED_DISABLE_UNKNOWN_FROM_SYNC = 1 << 5, 78 DEPRECATED_DISABLE_UNKNOWN_FROM_SYNC = 1 << 5,
79 // DISABLE_PERMISSIONS_CONSENT = 1 << 6, // Deprecated. 79 // DISABLE_PERMISSIONS_CONSENT = 1 << 6, // Deprecated.
80 // DISABLE_KNOWN_DISABLED = 1 << 7, // Deprecated. 80 // DISABLE_KNOWN_DISABLED = 1 << 7, // Deprecated.
81 DISABLE_NOT_VERIFIED = 1 << 8, // Disabled because we could not verify 81 DISABLE_NOT_VERIFIED = 1 << 8, // Disabled because we could not verify
82 // the install. 82 // the install.
83 DISABLE_GREYLIST = 1 << 9, 83 DISABLE_GREYLIST = 1 << 9,
84 DISABLE_CORRUPTED = 1 << 10, 84 DISABLE_CORRUPTED = 1 << 10,
85 DISABLE_REMOTE_INSTALL = 1 << 11, 85 DISABLE_REMOTE_INSTALL = 1 << 11,
86 // DISABLE_INACTIVE_EPHEMERAL_APP = 1 << 12, // Deprecated. 86 // DISABLE_INACTIVE_EPHEMERAL_APP = 1 << 12, // Deprecated.
87 DISABLE_EXTERNAL_EXTENSION = 1 << 13, // External extensions might be 87 DISABLE_EXTERNAL_EXTENSION = 1 << 13, // External extensions might be
88 // disabled for user prompting. 88 // disabled for user prompting.
89 DISABLE_UPDATE_REQUIRED_BY_POLICY = 1 << 14, // Doesn't meet minimum 89 DISABLE_UPDATE_REQUIRED_BY_POLICY = 1 << 14, // Doesn't meet minimum
90 // version requirement. 90 // version requirement..
91 DISABLE_REASON_LAST = 1 << 15, // This should always be the last value 91 DISABLE_CUSTODIAN_APPROVAL_REQUIRED = 1 << 15, // Supervised user needs
92 // approval by custodian.
93 DISABLE_REASON_LAST = 1 << 16, // This should always be the last value
92 }; 94 };
93 95
94 // A base class for parsed manifest data that APIs want to store on 96 // A base class for parsed manifest data that APIs want to store on
95 // the extension. Related to base::SupportsUserData, but with an immutable 97 // the extension. Related to base::SupportsUserData, but with an immutable
96 // thread-safe interface to match Extension. 98 // thread-safe interface to match Extension.
97 struct ManifestData { 99 struct ManifestData {
98 virtual ~ManifestData() {} 100 virtual ~ManifestData() {}
99 }; 101 };
100 102
101 // Do not change the order of entries or remove entries in this list 103 // Do not change the order of entries or remove entries in this list
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 const PermissionSet& permissions; 568 const PermissionSet& permissions;
567 569
568 UpdatedExtensionPermissionsInfo(const Extension* extension, 570 UpdatedExtensionPermissionsInfo(const Extension* extension,
569 const PermissionSet& permissions, 571 const PermissionSet& permissions,
570 Reason reason); 572 Reason reason);
571 }; 573 };
572 574
573 } // namespace extensions 575 } // namespace extensions
574 576
575 #endif // EXTENSIONS_COMMON_EXTENSION_H_ 577 #endif // EXTENSIONS_COMMON_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698