Chromium Code Reviews| Index: chrome/browser/extensions/pending_extension_manager.h |
| diff --git a/chrome/browser/extensions/pending_extension_manager.h b/chrome/browser/extensions/pending_extension_manager.h |
| index 627077b14101f00c08861f561567eaf77ec5addb..0f8f65a2b16fb7dcb003979ef3ee1ddf7ba561d8 100644 |
| --- a/chrome/browser/extensions/pending_extension_manager.h |
| +++ b/chrome/browser/extensions/pending_extension_manager.h |
| @@ -6,10 +6,12 @@ |
| #define CHROME_BROWSER_EXTENSIONS_PENDING_EXTENSION_MANAGER_H_ |
| #include <list> |
| +#include <map> |
| #include <string> |
| #include "base/gtest_prod_util.h" |
| #include "base/macros.h" |
| +#include "base/time/time.h" |
| #include "chrome/browser/extensions/pending_extension_info.h" |
| #include "extensions/common/manifest.h" |
| @@ -67,6 +69,13 @@ class PendingExtensionManager { |
| // Whether there is pending extension install from sync. |
| bool HasPendingExtensionFromSync() const; |
| + // Notify the manager that we are reinstalling the policy force-installed |
|
lazyboy
2016/09/02 19:21:53
nit: Notifies the manager...
Also I'd be more clea
asargent_no_longer_on_chrome
2016/09/09 03:30:44
Done. Used "ExpectPolicyReinstallForCorruption" ("
|
| + // extension with |id|. |
| + void ExpectPolicyReinstall(const std::string& id); |
|
lazyboy
2016/09/02 19:21:53
nit: use ExtensionId (which is a string) for new e
asargent_no_longer_on_chrome
2016/09/09 03:30:44
Done.
|
| + |
| + // Are we expecting a reinstall of the extension with |id|? |
| + bool IsPolicyReinstallExpected(const std::string& id) const; |
| + |
| // Adds an extension in a pending state; the extension with the |
| // given info will be installed on the next auto-update cycle. |
| // Return true if the extension was added. Will return false |
| @@ -140,6 +149,10 @@ class PendingExtensionManager { |
| PendingExtensionList pending_extension_list_; |
| + // A set of policy force-installed extension ids that are being reinstalled |
| + // due to corruption, mapped to the time we detected the corruption. |
| + std::map<std::string, base::TimeTicks> expected_policy_reinstalls_; |
| + |
| FRIEND_TEST_ALL_PREFIXES(::ExtensionServiceTest, |
| UpdatePendingExtensionAlreadyInstalled); |
| friend class ExtensionUpdaterTest; |