OLD | NEW |
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 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 std::string old_name; | 515 std::string old_name; |
516 | 516 |
517 InstalledExtensionInfo(const Extension* extension, | 517 InstalledExtensionInfo(const Extension* extension, |
518 bool is_update, | 518 bool is_update, |
519 const std::string& old_name); | 519 const std::string& old_name); |
520 }; | 520 }; |
521 | 521 |
522 struct UnloadedExtensionInfo { | 522 struct UnloadedExtensionInfo { |
523 // TODO(DHNishi): Move this enum to ExtensionRegistryObserver. | 523 // TODO(DHNishi): Move this enum to ExtensionRegistryObserver. |
524 enum Reason { | 524 enum Reason { |
525 REASON_DISABLE, // Extension is being disabled. | 525 REASON_UNDEFINED, // Undefined state used to initialize variables. |
526 REASON_UPDATE, // Extension is being updated to a newer version. | 526 REASON_DISABLE, // Extension is being disabled. |
527 REASON_UNINSTALL, // Extension is being uninstalled. | 527 REASON_UPDATE, // Extension is being updated to a newer version. |
528 REASON_TERMINATE, // Extension has terminated. | 528 REASON_UNINSTALL, // Extension is being uninstalled. |
529 REASON_BLACKLIST, // Extension has been blacklisted. | 529 REASON_TERMINATE, // Extension has terminated. |
| 530 REASON_BLACKLIST, // Extension has been blacklisted. |
| 531 REASON_PROFILE_SHUTDOWN, // Profile is being shut down. |
530 }; | 532 }; |
531 | 533 |
532 Reason reason; | 534 Reason reason; |
533 | 535 |
534 // The extension being unloaded - this should always be non-NULL. | 536 // The extension being unloaded - this should always be non-NULL. |
535 const Extension* extension; | 537 const Extension* extension; |
536 | 538 |
537 UnloadedExtensionInfo(const Extension* extension, Reason reason); | 539 UnloadedExtensionInfo(const Extension* extension, Reason reason); |
538 }; | 540 }; |
539 | 541 |
(...skipping 16 matching lines...) Expand all Loading... |
556 | 558 |
557 UpdatedExtensionPermissionsInfo( | 559 UpdatedExtensionPermissionsInfo( |
558 const Extension* extension, | 560 const Extension* extension, |
559 const PermissionSet* permissions, | 561 const PermissionSet* permissions, |
560 Reason reason); | 562 Reason reason); |
561 }; | 563 }; |
562 | 564 |
563 } // namespace extensions | 565 } // namespace extensions |
564 | 566 |
565 #endif // EXTENSIONS_COMMON_EXTENSION_H_ | 567 #endif // EXTENSIONS_COMMON_EXTENSION_H_ |
OLD | NEW |