diff options
author | mihaip@chromium.org <mihaip@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-13 05:30:59 +0000 |
---|---|---|
committer | mihaip@chromium.org <mihaip@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-08-13 05:30:59 +0000 |
commit | 814a7bf0ff8e016769a4ff3717daab50ef388be6 (patch) | |
tree | 713b3d7162c0fda51ccf0546c107c6270345ddc4 /chrome | |
parent | ebe602db1fe4f0e994728302edfb7d909158dfa0 (diff) | |
download | chromium_src-814a7bf0ff8e016769a4ff3717daab50ef388be6.zip chromium_src-814a7bf0ff8e016769a4ff3717daab50ef388be6.tar.gz chromium_src-814a7bf0ff8e016769a4ff3717daab50ef388be6.tar.bz2 |
Remove extension.h #include from profile.h.
Touching extension.h now results in 202 files being compiled instead of 495 (when
building the chrome target). Required that the UnloadedExtensionReason enum be
moved to extension_constants.h.
R=asargent@chromium.org
Review URL: http://codereview.chromium.org/7633029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96686 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
22 files changed, 57 insertions, 44 deletions
diff --git a/chrome/browser/automation/automation_extension_tracker.cc b/chrome/browser/automation/automation_extension_tracker.cc index 9c75c7a..6ba03ab 100644 --- a/chrome/browser/automation/automation_extension_tracker.cc +++ b/chrome/browser/automation/automation_extension_tracker.cc @@ -7,6 +7,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "content/common/notification_service.h" AutomationExtensionTracker::AutomationExtensionTracker( @@ -35,7 +36,7 @@ void AutomationExtensionTracker::Observe(int type, Profile* profile = Source<Profile>(source).ptr(); if (profile) { ExtensionService* service = profile->GetExtensionService(); - if (service && info->reason == UnloadedExtensionInfo::UNINSTALL) { + if (service && info->reason == extension_misc::UNLOAD_REASON_UNINSTALL) { // Remove this extension only if it is uninstalled, not just disabled. CloseResource(extension); } diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc index 9ec28ec..bc3e606 100644 --- a/chrome/browser/background/background_contents_service.cc +++ b/chrome/browser/background/background_contents_service.cc @@ -24,6 +24,7 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/pref_names.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/site_instance.h" @@ -292,13 +293,14 @@ void BackgroundContentsService::Observe(int type, } case chrome::NOTIFICATION_EXTENSION_UNLOADED: switch (Details<UnloadedExtensionInfo>(details)->reason) { - case UnloadedExtensionInfo::DISABLE: // Intentionally fall through. - case UnloadedExtensionInfo::UNINSTALL: + // Intentionally fall through. + case extension_misc::UNLOAD_REASON_DISABLE: + case extension_misc::UNLOAD_REASON_UNINSTALL: ShutdownAssociatedBackgroundContents( ASCIIToUTF16( Details<UnloadedExtensionInfo>(details)->extension->id())); break; - case UnloadedExtensionInfo::UPDATE: { + case extension_misc::UNLOAD_REASON_UPDATE: { // If there is a manifest specified background page, then shut it down // here, since if the updated extension still has the background page, // then it will be loaded from LOADED callback. Otherwise, leave diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc index d0b2903..7b56929 100644 --- a/chrome/browser/extensions/app_process_apitest.cc +++ b/chrome/browser/extensions/app_process_apitest.cc @@ -10,6 +10,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/common/chrome_switches.h" +#include "chrome/common/extensions/extension.h" #include "chrome/test/base/ui_test_utils.h" #include "content/browser/renderer_host/render_view_host.h" #include "content/browser/tab_contents/tab_contents.h" diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc index ae2d148..b6ca886 100644 --- a/chrome/browser/extensions/extension_browsertest.cc +++ b/chrome/browser/extensions/extension_browsertest.cc @@ -306,7 +306,7 @@ void ExtensionBrowserTest::ReloadExtension(const std::string& extension_id) { void ExtensionBrowserTest::UnloadExtension(const std::string& extension_id) { ExtensionService* service = browser()->profile()->GetExtensionService(); - service->UnloadExtension(extension_id, UnloadedExtensionInfo::DISABLE); + service->UnloadExtension(extension_id, extension_misc::UNLOAD_REASON_DISABLE); } void ExtensionBrowserTest::UninstallExtension(const std::string& extension_id) { diff --git a/chrome/browser/extensions/extension_disabled_infobar_delegate.cc b/chrome/browser/extensions/extension_disabled_infobar_delegate.cc index bdcdfbd..6dbd444 100644 --- a/chrome/browser/extensions/extension_disabled_infobar_delegate.cc +++ b/chrome/browser/extensions/extension_disabled_infobar_delegate.cc @@ -162,8 +162,8 @@ void ExtensionDisabledInfobarDelegate::Observe( } else { DCHECK_EQ(chrome::NOTIFICATION_EXTENSION_UNLOADED, type); UnloadedExtensionInfo* info = Details<UnloadedExtensionInfo>(details).ptr(); - if (info->reason == UnloadedExtensionInfo::DISABLE || - info->reason == UnloadedExtensionInfo::UNINSTALL) + if (info->reason == extension_misc::UNLOAD_REASON_DISABLE || + info->reason == extension_misc::UNLOAD_REASON_UNINSTALL) extension = info->extension; } if (extension == extension_) diff --git a/chrome/browser/extensions/extension_info_map.cc b/chrome/browser/extensions/extension_info_map.cc index 4e16420..29462cc 100644 --- a/chrome/browser/extensions/extension_info_map.cc +++ b/chrome/browser/extensions/extension_info_map.cc @@ -52,15 +52,15 @@ void ExtensionInfoMap::AddExtension(const Extension* extension, } void ExtensionInfoMap::RemoveExtension(const std::string& extension_id, - const UnloadedExtensionInfo::Reason reason) { + const extension_misc::UnloadedExtensionReason reason) { CheckOnValidThread(); const Extension* extension = extensions_.GetByID(extension_id); extra_data_.erase(extension_id); // we don't care about disabled extra data if (extension) { - if (reason == UnloadedExtensionInfo::DISABLE) + if (reason == extension_misc::UNLOAD_REASON_DISABLE) disabled_extensions_.Insert(extension); extensions_.Remove(extension_id); - } else if (reason != UnloadedExtensionInfo::DISABLE) { + } else if (reason != extension_misc::UNLOAD_REASON_DISABLE) { // If the extension was uninstalled, make sure it's removed from the map of // disabled extensions. disabled_extensions_.Remove(extension_id); diff --git a/chrome/browser/extensions/extension_info_map.h b/chrome/browser/extensions/extension_info_map.h index 63a6346..f8fe68e 100644 --- a/chrome/browser/extensions/extension_info_map.h +++ b/chrome/browser/extensions/extension_info_map.h @@ -11,7 +11,7 @@ #include "base/basictypes.h" #include "base/time.h" #include "base/memory/ref_counted.h" -#include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_set.h" class Extension; @@ -36,7 +36,7 @@ class ExtensionInfoMap : public base::RefCountedThreadSafe<ExtensionInfoMap> { // Callback for when an extension is unloaded. void RemoveExtension(const std::string& extension_id, - const UnloadedExtensionInfo::Reason reason); + const extension_misc::UnloadedExtensionReason reason); // Returns the time the extension was installed, or base::Time() if not found. base::Time GetInstallTime(const std::string& extension_id) const; diff --git a/chrome/browser/extensions/extension_info_map_unittest.cc b/chrome/browser/extensions/extension_info_map_unittest.cc index 5df0bd1..8bba598 100644 --- a/chrome/browser/extensions/extension_info_map_unittest.cc +++ b/chrome/browser/extensions/extension_info_map_unittest.cc @@ -94,7 +94,8 @@ TEST_F(ExtensionInfoMapTest, RefCounting) { EXPECT_TRUE(weak_extension1->HasOneRef()); // Remove extension2, and the extension2 object should have the only ref. - info_map->RemoveExtension(extension2->id(), UnloadedExtensionInfo::UNINSTALL); + info_map->RemoveExtension( + extension2->id(), extension_misc::UNLOAD_REASON_UNINSTALL); EXPECT_TRUE(extension2->HasOneRef()); // Delete the info map, and the extension3 object should have the only ref. diff --git a/chrome/browser/extensions/extension_menu_manager_unittest.cc b/chrome/browser/extensions/extension_menu_manager_unittest.cc index ca8cdd7..a70ce42 100644 --- a/chrome/browser/extensions/extension_menu_manager_unittest.cc +++ b/chrome/browser/extensions/extension_menu_manager_unittest.cc @@ -331,7 +331,8 @@ TEST_F(ExtensionMenuManagerTest, ExtensionUnloadRemovesMenuItems) { // Notify that the extension was unloaded, and make sure the right item is // gone. - UnloadedExtensionInfo details(extension1, UnloadedExtensionInfo::DISABLE); + UnloadedExtensionInfo details( + extension1, extension_misc::UNLOAD_REASON_DISABLE); notifier->Notify(chrome::NOTIFICATION_EXTENSION_UNLOADED, Source<Profile>(NULL), Details<UnloadedExtensionInfo>(&details)); diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc index a4d04c9..8328edc 100644 --- a/chrome/browser/extensions/extension_service.cc +++ b/chrome/browser/extensions/extension_service.cc @@ -869,7 +869,7 @@ bool ExtensionService::UninstallExtension( // Unload before doing more cleanup to ensure that nothing is hanging on to // any of these resources. - UnloadExtension(extension_id, UnloadedExtensionInfo::UNINSTALL); + UnloadExtension(extension_id, extension_misc::UNLOAD_REASON_UNINSTALL); extension_prefs_->OnExtensionUninstalled(extension_id, location, external_uninstall); @@ -987,7 +987,7 @@ void ExtensionService::DisableExtension(const std::string& extension_id) { terminated_extensions_.erase(iter); } - NotifyExtensionUnloaded(extension, UnloadedExtensionInfo::DISABLE); + NotifyExtensionUnloaded(extension, extension_misc::UNLOAD_REASON_DISABLE); } void ExtensionService::GrantPermissions(const Extension* extension) { @@ -1125,7 +1125,7 @@ void ExtensionService::UnloadComponentExtension( LOG(ERROR) << "Failed to get extension id"; return; } - UnloadExtension(id, UnloadedExtensionInfo::DISABLE); + UnloadExtension(id, extension_misc::UNLOAD_REASON_DISABLE); } void ExtensionService::LoadAllExtensions() { @@ -1481,7 +1481,8 @@ void ExtensionService::NotifyExtensionLoaded(const Extension* extension) { } void ExtensionService::NotifyExtensionUnloaded( - const Extension* extension, UnloadedExtensionInfo::Reason reason) { + const Extension* extension, + extension_misc::UnloadedExtensionReason reason) { UnloadedExtensionInfo details(extension, reason); NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_UNLOADED, @@ -1568,7 +1569,7 @@ void ExtensionService::UpdateExtensionBlacklist( // UnloadExtension will change the extensions_ list. So, we should // call it outside the iterator loop. for (unsigned int i = 0; i < to_be_removed.size(); ++i) { - UnloadExtension(to_be_removed[i], UnloadedExtensionInfo::DISABLE); + UnloadExtension(to_be_removed[i], extension_misc::UNLOAD_REASON_DISABLE); } } @@ -1606,7 +1607,7 @@ void ExtensionService::CheckAdminBlacklist() { // UnloadExtension will change the extensions_ list. So, we should // call it outside the iterator loop. for (unsigned int i = 0; i < to_be_removed.size(); ++i) - UnloadExtension(to_be_removed[i], UnloadedExtensionInfo::DISABLE); + UnloadExtension(to_be_removed[i], extension_misc::UNLOAD_REASON_DISABLE); } void ExtensionService::CheckForUpdatesSoon() { @@ -1750,7 +1751,8 @@ void ExtensionService::SetIsIncognitoEnabled( // reload it to update UI. const Extension* enabled_extension = GetExtensionById(extension_id, false); if (enabled_extension) { - NotifyExtensionUnloaded(enabled_extension, UnloadedExtensionInfo::DISABLE); + NotifyExtensionUnloaded( + enabled_extension, extension_misc::UNLOAD_REASON_DISABLE); NotifyExtensionLoaded(enabled_extension); } } @@ -1874,7 +1876,7 @@ void ExtensionService::OnExternalProviderReady() { void ExtensionService::UnloadExtension( const std::string& extension_id, - UnloadedExtensionInfo::Reason reason) { + extension_misc::UnloadedExtensionReason reason) { // Make sure the extension gets deleted after we return from this function. scoped_refptr<const Extension> extension( GetExtensionByIdInternal(extension_id, true, true, false)); @@ -2117,7 +2119,7 @@ void ExtensionService::InitializePermissions(const Extension* extension) { // To upgrade an extension in place, unload the old one and // then load the new one. - UnloadExtension(old->id(), UnloadedExtensionInfo::UPDATE); + UnloadExtension(old->id(), extension_misc::UNLOAD_REASON_UPDATE); old = NULL; } @@ -2268,7 +2270,7 @@ void ExtensionService::TrackTerminatedExtension(const Extension* extension) { if (terminated_extension_ids_.insert(extension->id()).second) terminated_extensions_.push_back(make_scoped_refptr(extension)); - UnloadExtension(extension->id(), UnloadedExtensionInfo::DISABLE); + UnloadExtension(extension->id(), extension_misc::UNLOAD_REASON_DISABLE); } void ExtensionService::UntrackTerminatedExtension(const std::string& id) { diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h index 5327e7c..f3ce586 100644 --- a/chrome/browser/extensions/extension_service.h +++ b/chrome/browser/extensions/extension_service.h @@ -34,7 +34,7 @@ #include "chrome/browser/extensions/pending_extension_manager.h" #include "chrome/browser/extensions/sandboxed_extension_unpacker.h" #include "chrome/browser/prefs/pref_change_registrar.h" -#include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "content/browser/browser_thread.h" #include "content/common/notification_observer.h" #include "content/common/notification_registrar.h" @@ -358,7 +358,7 @@ class ExtensionService // Unload the specified extension. void UnloadExtension(const std::string& extension_id, - UnloadedExtensionInfo::Reason reason); + extension_misc::UnloadedExtensionReason reason); // Unload all extensions. This is currently only called on shutdown, and // does not send notifications. @@ -613,7 +613,7 @@ class ExtensionService // Handles sending notification that |extension| was unloaded. void NotifyExtensionUnloaded(const Extension* extension, - UnloadedExtensionInfo::Reason reason); + extension_misc::UnloadedExtensionReason reason); // Helper that updates the active extension list used for crash reporting. void UpdateActiveExtensionsInCrashReporter(); diff --git a/chrome/browser/extensions/image_loading_tracker_unittest.cc b/chrome/browser/extensions/image_loading_tracker_unittest.cc index 7de7e8e..7dadf12 100644 --- a/chrome/browser/extensions/image_loading_tracker_unittest.cc +++ b/chrome/browser/extensions/image_loading_tracker_unittest.cc @@ -162,7 +162,7 @@ TEST_F(ImageLoadingTrackerTest, DeleteExtensionWhileWaitingForCache) { // Send out notification the extension was uninstalled. UnloadedExtensionInfo details(extension.get(), - UnloadedExtensionInfo::UNINSTALL); + extension_misc::UNLOAD_REASON_UNINSTALL); NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_UNLOADED, NotificationService::AllSources(), diff --git a/chrome/browser/extensions/user_script_listener_unittest.cc b/chrome/browser/extensions/user_script_listener_unittest.cc index 9d8064d..c0ee550 100644 --- a/chrome/browser/extensions/user_script_listener_unittest.cc +++ b/chrome/browser/extensions/user_script_listener_unittest.cc @@ -168,7 +168,7 @@ class UserScriptListenerTest void UnloadTestExtension() { ASSERT_FALSE(service_->extensions()->empty()); service_->UnloadExtension(service_->extensions()->at(0)->id(), - UnloadedExtensionInfo::DISABLE); + extension_misc::UNLOAD_REASON_DISABLE); } scoped_refptr<UserScriptListener> listener_; diff --git a/chrome/browser/profiles/profile.h b/chrome/browser/profiles/profile.h index c7e111a..e7c2836 100644 --- a/chrome/browser/profiles/profile.h +++ b/chrome/browser/profiles/profile.h @@ -13,7 +13,7 @@ #include "base/basictypes.h" #include "base/logging.h" #include "chrome/browser/net/preconnect.h" // TODO: remove this. -#include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "content/browser/browser_context.h" namespace base { @@ -382,7 +382,7 @@ class Profile : public content::BrowserContext { // EXTENSION_UNLOADED notification have finished running. virtual void UnregisterExtensionWithRequestContexts( const std::string& extension_id, - const UnloadedExtensionInfo::Reason) {} + const extension_misc::UnloadedExtensionReason) {} // Returns the SSLConfigService for this profile. virtual net::SSLConfigService* GetSSLConfigService() = 0; diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index a7f2ac7..d6a40ec 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc @@ -993,7 +993,7 @@ void ProfileImpl::RegisterExtensionWithRequestContexts( void ProfileImpl::UnregisterExtensionWithRequestContexts( const std::string& extension_id, - const UnloadedExtensionInfo::Reason reason) { + const extension_misc::UnloadedExtensionReason reason) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, NewRunnableMethod(extension_info_map_.get(), diff --git a/chrome/browser/profiles/profile_impl.h b/chrome/browser/profiles/profile_impl.h index da1d672..b37baa0 100644 --- a/chrome/browser/profiles/profile_impl.h +++ b/chrome/browser/profiles/profile_impl.h @@ -92,7 +92,7 @@ class ProfileImpl : public Profile, virtual void RegisterExtensionWithRequestContexts(const Extension* extension); virtual void UnregisterExtensionWithRequestContexts( const std::string& extension_id, - const UnloadedExtensionInfo::Reason reason); + const extension_misc::UnloadedExtensionReason reason); virtual net::SSLConfigService* GetSSLConfigService(); virtual HostContentSettingsMap* GetHostContentSettingsMap(); virtual HostZoomMap* GetHostZoomMap(); diff --git a/chrome/browser/sync/glue/app_change_processor.cc b/chrome/browser/sync/glue/app_change_processor.cc index f8e69a8..e8f4009 100644 --- a/chrome/browser/sync/glue/app_change_processor.cc +++ b/chrome/browser/sync/glue/app_change_processor.cc @@ -17,6 +17,7 @@ #include "chrome/browser/sync/unrecoverable_error_handler.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "content/browser/browser_thread.h" #include "content/common/notification_details.h" #include "content/common/notification_source.h" @@ -71,7 +72,7 @@ void AppChangeProcessor::Observe(int type, if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) { const UnloadedExtensionInfo& info = *Details<UnloadedExtensionInfo>(details).ptr(); - if (info.reason == UnloadedExtensionInfo::UNINSTALL) { + if (info.reason == extension_misc::UNLOAD_REASON_UNINSTALL) { VLOG(1) << "Removing server data for uninstalled extension " << id << " of type " << info.extension->GetType(); RemoveServerData(traits_, id, share_handle()); diff --git a/chrome/browser/sync/glue/extension_change_processor.cc b/chrome/browser/sync/glue/extension_change_processor.cc index 6d97dc4..71043a0 100644 --- a/chrome/browser/sync/glue/extension_change_processor.cc +++ b/chrome/browser/sync/glue/extension_change_processor.cc @@ -17,6 +17,7 @@ #include "chrome/browser/sync/unrecoverable_error_handler.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "content/browser/browser_thread.h" #include "content/common/notification_details.h" #include "content/common/notification_source.h" @@ -71,7 +72,7 @@ void ExtensionChangeProcessor::Observe(int type, if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) { const UnloadedExtensionInfo& info = *Details<UnloadedExtensionInfo>(details).ptr(); - if (info.reason == UnloadedExtensionInfo::UNINSTALL) { + if (info.reason == extension_misc::UNLOAD_REASON_UNINSTALL) { VLOG(1) << "Removing server data for uninstalled extension " << id << " of type " << info.extension->GetType(); RemoveServerData(traits_, id, share_handle()); diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper_synced_tab_delegate.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper_synced_tab_delegate.cc index 2c72807..124b7e0 100644 --- a/chrome/browser/ui/tab_contents/tab_contents_wrapper_synced_tab_delegate.cc +++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper_synced_tab_delegate.cc @@ -9,6 +9,7 @@ #include "chrome/browser/extensions/extension_tab_helper.h" #include "chrome/browser/sessions/restore_tab_helper.h" #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" +#include "chrome/common/extensions/extension.h" TabContentsWrapperSyncedTabDelegate::TabContentsWrapperSyncedTabDelegate( diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index 5488349..1b62353 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -2865,7 +2865,7 @@ UninstalledExtensionInfo::~UninstalledExtensionInfo() {} UnloadedExtensionInfo::UnloadedExtensionInfo( const Extension* extension, - Reason reason) + extension_misc::UnloadedExtensionReason reason) : reason(reason), already_disabled(false), extension(extension) {} diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h index e46cba1..d5801f5 100644 --- a/chrome/common/extensions/extension.h +++ b/chrome/common/extensions/extension.h @@ -898,13 +898,7 @@ struct UninstalledExtensionInfo { }; struct UnloadedExtensionInfo { - enum Reason { - DISABLE, // The extension is being disabled. - UPDATE, // The extension is being updated to a newer version. - UNINSTALL, // The extension is being uninstalled. - }; - - Reason reason; + extension_misc::UnloadedExtensionReason reason; // Was the extension already disabled? bool already_disabled; @@ -912,7 +906,9 @@ struct UnloadedExtensionInfo { // The extension being unloaded - this should always be non-NULL. const Extension* extension; - UnloadedExtensionInfo(const Extension* extension, Reason reason); + UnloadedExtensionInfo( + const Extension* extension, + extension_misc::UnloadedExtensionReason reason); }; // The details sent for EXTENSION_PERMISSIONS_UPDATED notifications. diff --git a/chrome/common/extensions/extension_constants.h b/chrome/common/extensions/extension_constants.h index 5c980e0f..983e0b7 100644 --- a/chrome/common/extensions/extension_constants.h +++ b/chrome/common/extensions/extension_constants.h @@ -410,6 +410,12 @@ namespace extension_misc { INSTALL_CAUSE_AUTOMATION, NUM_INSTALL_CAUSES }; + + enum UnloadedExtensionReason { + UNLOAD_REASON_DISABLE, // Extension is being disabled. + UNLOAD_REASON_UPDATE, // Extension is being updated to a newer version. + UNLOAD_REASON_UNINSTALL, // Extension is being uninstalled. + }; } // extension_misc #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_CONSTANTS_H_ |