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

Unified Diff: chrome/browser/extensions/extension_service.h

Issue 22799016: Kill NOTIFICATION_EXTENSION_REMOVED (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nit Created 7 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_disabled_ui.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « chrome/browser/extensions/extension_disabled_ui.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698