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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 DISALLOW_COPY_AND_ASSIGN(ExtensionInfo); | 501 DISALLOW_COPY_AND_ASSIGN(ExtensionInfo); |
502 }; | 502 }; |
503 | 503 |
504 struct InstalledExtensionInfo { | 504 struct InstalledExtensionInfo { |
505 // The extension being installed - this should always be non-NULL. | 505 // The extension being installed - this should always be non-NULL. |
506 const Extension* extension; | 506 const Extension* extension; |
507 | 507 |
508 // True if the extension is being updated; false if it is being installed. | 508 // True if the extension is being updated; false if it is being installed. |
509 bool is_update; | 509 bool is_update; |
510 | 510 |
| 511 // True if the extension was previously installed ephemerally and is now |
| 512 // a regular installed extension. |
| 513 bool from_ephemeral; |
| 514 |
511 // The name of the extension prior to this update. Will be empty if | 515 // The name of the extension prior to this update. Will be empty if |
512 // |is_update| is false. | 516 // |is_update| is false. |
513 std::string old_name; | 517 std::string old_name; |
514 | 518 |
515 InstalledExtensionInfo(const Extension* extension, | 519 InstalledExtensionInfo(const Extension* extension, |
516 bool is_update, | 520 bool is_update, |
| 521 bool from_ephemeral, |
517 const std::string& old_name); | 522 const std::string& old_name); |
518 }; | 523 }; |
519 | 524 |
520 struct UnloadedExtensionInfo { | 525 struct UnloadedExtensionInfo { |
521 // TODO(DHNishi): Move this enum to ExtensionRegistryObserver. | 526 // TODO(DHNishi): Move this enum to ExtensionRegistryObserver. |
522 enum Reason { | 527 enum Reason { |
523 REASON_UNDEFINED, // Undefined state used to initialize variables. | 528 REASON_UNDEFINED, // Undefined state used to initialize variables. |
524 REASON_DISABLE, // Extension is being disabled. | 529 REASON_DISABLE, // Extension is being disabled. |
525 REASON_UPDATE, // Extension is being updated to a newer version. | 530 REASON_UPDATE, // Extension is being updated to a newer version. |
526 REASON_UNINSTALL, // Extension is being uninstalled. | 531 REASON_UNINSTALL, // Extension is being uninstalled. |
(...skipping 29 matching lines...) Expand all Loading... |
556 | 561 |
557 UpdatedExtensionPermissionsInfo( | 562 UpdatedExtensionPermissionsInfo( |
558 const Extension* extension, | 563 const Extension* extension, |
559 const PermissionSet* permissions, | 564 const PermissionSet* permissions, |
560 Reason reason); | 565 Reason reason); |
561 }; | 566 }; |
562 | 567 |
563 } // namespace extensions | 568 } // namespace extensions |
564 | 569 |
565 #endif // EXTENSIONS_COMMON_EXTENSION_H_ | 570 #endif // EXTENSIONS_COMMON_EXTENSION_H_ |
OLD | NEW |