| Index: chrome/browser/extensions/extension_service.h
|
| diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h
|
| index 01fabca9f20b96d4364c650723413a1406a0031f..a071d4d09fc7f142c0208fc5b02bceaabbe6dbd2 100644
|
| --- a/chrome/browser/extensions/extension_service.h
|
| +++ b/chrome/browser/extensions/extension_service.h
|
| @@ -10,6 +10,7 @@
|
| #include <string>
|
| #include <vector>
|
|
|
| +#include "base/callback_forward.h"
|
| #include "base/compiler_specific.h"
|
| #include "base/files/file_path.h"
|
| #include "base/gtest_prod_util.h"
|
| @@ -695,6 +696,12 @@ class ExtensionService
|
| // sync_start_util for more.
|
| void SetSyncStartFlare(const syncer::SyncableService::StartSyncFlare& flare);
|
|
|
| + // Register and remove callbacks to be notified when an extension is removed.
|
| + void RegisterExtensionRemovedCallback(
|
| + const base::Callback<void(const extensions::Extension*)>& callback);
|
| + void RemoveExtensionRemovedCallback(
|
| + const base::Callback<void(const extensions::Extension*)>& callback);
|
| +
|
| private:
|
| // Contains Extension data that can change during the life of the process,
|
| // but does not persist across restarts.
|
| @@ -756,6 +763,9 @@ class ExtensionService
|
| void NotifyExtensionUnloaded(const extensions::Extension* extension,
|
| extension_misc::UnloadedExtensionReason reason);
|
|
|
| + // Handles sending notification that |extension| was removed.
|
| + void NotifyExtensionRemoved(const extensions::Extension* extension);
|
| +
|
| // Common helper to finish installing the given extension.
|
| void FinishInstallation(const extensions::Extension* extension);
|
|
|
| @@ -960,6 +970,9 @@ class ExtensionService
|
| // asynchronously via MergeDataAndStartSyncing as soon as possible.
|
| syncer::SyncableService::StartSyncFlare flare_;
|
|
|
| + std::vector<base::Callback<void(const extensions::Extension*)> >
|
| + extension_removed_callbacks_;
|
| +
|
| FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
|
| InstallAppsWithUnlimtedStorage);
|
| FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest,
|
|
|