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

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

Issue 695133005: Temporarily disable extensions and sync while a profile is locked - Profiles Approach (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 1 month 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 <algorithm> 8 #include <algorithm>
9 #include <iosfwd> 9 #include <iosfwd>
10 #include <map> 10 #include <map>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 enum State { 63 enum State {
64 DISABLED = 0, 64 DISABLED = 0,
65 ENABLED, 65 ENABLED,
66 // An external extension that the user uninstalled. We should not reinstall 66 // An external extension that the user uninstalled. We should not reinstall
67 // such extensions on startup. 67 // such extensions on startup.
68 EXTERNAL_EXTENSION_UNINSTALLED, 68 EXTERNAL_EXTENSION_UNINSTALLED,
69 // DEPRECATED: Special state for component extensions. 69 // DEPRECATED: Special state for component extensions.
70 // Maintained as a placeholder since states may be stored to disk. 70 // Maintained as a placeholder since states may be stored to disk.
71 ENABLED_COMPONENT_DEPRECATED, 71 ENABLED_COMPONENT_DEPRECATED,
72 // Add new states here as this enum is stored in prefs.
72 NUM_STATES 73 NUM_STATES
73 }; 74 };
74 75
75 // Used to record the reason an extension was disabled. 76 // Used to record the reason an extension was disabled.
76 enum DeprecatedDisableReason { 77 enum DeprecatedDisableReason {
77 DEPRECATED_DISABLE_UNKNOWN, 78 DEPRECATED_DISABLE_UNKNOWN,
78 DEPRECATED_DISABLE_USER_ACTION, 79 DEPRECATED_DISABLE_USER_ACTION,
79 DEPRECATED_DISABLE_PERMISSIONS_INCREASE, 80 DEPRECATED_DISABLE_PERMISSIONS_INCREASE,
80 DEPRECATED_DISABLE_RELOAD, 81 DEPRECATED_DISABLE_RELOAD,
81 DEPRECATED_DISABLE_LAST, // Not used. 82 DEPRECATED_DISABLE_LAST, // Not used.
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 struct UnloadedExtensionInfo { 535 struct UnloadedExtensionInfo {
535 // TODO(DHNishi): Move this enum to ExtensionRegistryObserver. 536 // TODO(DHNishi): Move this enum to ExtensionRegistryObserver.
536 enum Reason { 537 enum Reason {
537 REASON_UNDEFINED, // Undefined state used to initialize variables. 538 REASON_UNDEFINED, // Undefined state used to initialize variables.
538 REASON_DISABLE, // Extension is being disabled. 539 REASON_DISABLE, // Extension is being disabled.
539 REASON_UPDATE, // Extension is being updated to a newer version. 540 REASON_UPDATE, // Extension is being updated to a newer version.
540 REASON_UNINSTALL, // Extension is being uninstalled. 541 REASON_UNINSTALL, // Extension is being uninstalled.
541 REASON_TERMINATE, // Extension has terminated. 542 REASON_TERMINATE, // Extension has terminated.
542 REASON_BLACKLIST, // Extension has been blacklisted. 543 REASON_BLACKLIST, // Extension has been blacklisted.
543 REASON_PROFILE_SHUTDOWN, // Profile is being shut down. 544 REASON_PROFILE_SHUTDOWN, // Profile is being shut down.
545 REASON_LOCK_ALL, // All extensions for the profile are blocked.
544 }; 546 };
545 547
546 Reason reason; 548 Reason reason;
547 549
548 // The extension being unloaded - this should always be non-NULL. 550 // The extension being unloaded - this should always be non-NULL.
549 const Extension* extension; 551 const Extension* extension;
550 552
551 UnloadedExtensionInfo(const Extension* extension, Reason reason); 553 UnloadedExtensionInfo(const Extension* extension, Reason reason);
552 }; 554 };
553 555
(...skipping 16 matching lines...) Expand all
570 572
571 UpdatedExtensionPermissionsInfo( 573 UpdatedExtensionPermissionsInfo(
572 const Extension* extension, 574 const Extension* extension,
573 const PermissionSet* permissions, 575 const PermissionSet* permissions,
574 Reason reason); 576 Reason reason);
575 }; 577 };
576 578
577 } // namespace extensions 579 } // namespace extensions
578 580
579 #endif // EXTENSIONS_COMMON_EXTENSION_H_ 581 #endif // EXTENSIONS_COMMON_EXTENSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698