diff options
author | yoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-23 09:12:13 +0000 |
---|---|---|
committer | yoz@chromium.org <yoz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-23 09:12:13 +0000 |
commit | b0af47917b401019c91510ac664be63926a949dc (patch) | |
tree | ee953b0eb81d49bfea2907060579590290ff2781 /chrome | |
parent | e52484db28caede10e585b75b9b46aff79bcf9a7 (diff) | |
download | chromium_src-b0af47917b401019c91510ac664be63926a949dc.zip chromium_src-b0af47917b401019c91510ac664be63926a949dc.tar.gz chromium_src-b0af47917b401019c91510ac664be63926a949dc.tar.bz2 |
Move extension_misc::UnloadedExtensionReason from extension_constants.h to UnloadedExtensionInfo in extension.h.
This precipitated a IWYU fix for extension_constants.h.
BUG=298586,310174
TBR=koz@chromium.org,sky@chromium.org
Review URL: https://codereview.chromium.org/36023002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@230377 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
53 files changed, 108 insertions, 85 deletions
diff --git a/chrome/browser/autocomplete/shortcuts_provider_unittest.cc b/chrome/browser/autocomplete/shortcuts_provider_unittest.cc index 4917a55..7a41932 100644 --- a/chrome/browser/autocomplete/shortcuts_provider_unittest.cc +++ b/chrome/browser/autocomplete/shortcuts_provider_unittest.cc @@ -617,7 +617,7 @@ TEST_F(ShortcutsProviderTest, Extension) { .SetID("cedabbhfglmiikkmdgcpjdkocfcmbkee") .Build(); extensions::UnloadedExtensionInfo details( - extension.get(), extension_misc::UNLOAD_REASON_UNINSTALL); + extension.get(), extensions::UnloadedExtensionInfo::REASON_UNINSTALL); content::NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_UNLOADED, content::Source<Profile>(&profile_), diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc index 9ab995c..7129e36 100644 --- a/chrome/browser/background/background_contents_service.cc +++ b/chrome/browser/background/background_contents_service.cc @@ -428,16 +428,16 @@ void BackgroundContentsService::Observe( } case chrome::NOTIFICATION_EXTENSION_UNLOADED: switch (content::Details<UnloadedExtensionInfo>(details)->reason) { - case extension_misc::UNLOAD_REASON_DISABLE: // Fall through. - case extension_misc::UNLOAD_REASON_TERMINATE: // Fall through. - case extension_misc::UNLOAD_REASON_UNINSTALL: // Fall through. - case extension_misc::UNLOAD_REASON_BLACKLIST: + case UnloadedExtensionInfo::REASON_DISABLE: // Fall through. + case UnloadedExtensionInfo::REASON_TERMINATE: // Fall through. + case UnloadedExtensionInfo::REASON_UNINSTALL: // Fall through. + case UnloadedExtensionInfo::REASON_BLACKLIST: ShutdownAssociatedBackgroundContents( ASCIIToUTF16(content::Details<UnloadedExtensionInfo>(details)-> extension->id())); SendChangeNotification(content::Source<Profile>(source).ptr()); break; - case extension_misc::UNLOAD_REASON_UPDATE: { + case UnloadedExtensionInfo::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/active_tab_unittest.cc b/chrome/browser/extensions/active_tab_unittest.cc index ae16beb2..d567d0c 100644 --- a/chrome/browser/extensions/active_tab_unittest.cc +++ b/chrome/browser/extensions/active_tab_unittest.cc @@ -270,7 +270,7 @@ TEST_F(ActiveTabTest, Uninstalling) { // Uninstalling the extension should clear its tab permissions. UnloadedExtensionInfo details(extension.get(), - extension_misc::UNLOAD_REASON_DISABLE); + UnloadedExtensionInfo::REASON_DISABLE); content::NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_UNLOADED, content::Source<Profile>(Profile::FromBrowserContext( diff --git a/chrome/browser/extensions/api/idle/idle_api_unittest.cc b/chrome/browser/extensions/api/idle/idle_api_unittest.cc index cf6ee66..012ef6d 100644 --- a/chrome/browser/extensions/api/idle/idle_api_unittest.cc +++ b/chrome/browser/extensions/api/idle/idle_api_unittest.cc @@ -16,7 +16,6 @@ #include "chrome/browser/extensions/extension_function_test_utils.h" #include "chrome/common/extensions/api/idle.h" #include "chrome/common/extensions/extension.h" -#include "chrome/common/extensions/extension_constants.h" #include "chrome/test/base/browser_with_test_window_test.h" #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_source.h" @@ -525,7 +524,7 @@ TEST_F(IdleTest, UnloadCleanup) { // Threshold will reset after unload (and listen count == 0) UnloadedExtensionInfo details(extension_.get(), - extension_misc::UNLOAD_REASON_UNINSTALL); + UnloadedExtensionInfo::REASON_UNINSTALL); idle_manager_->Observe( chrome::NOTIFICATION_EXTENSION_UNLOADED, content::Source<Profile>(browser()->profile()), @@ -546,7 +545,7 @@ TEST_F(IdleTest, UnloadCleanup) { // Verifies that unloading an extension with no listeners or threshold works. TEST_F(IdleTest, UnloadOnly) { UnloadedExtensionInfo details(extension_.get(), - extension_misc::UNLOAD_REASON_UNINSTALL); + UnloadedExtensionInfo::REASON_UNINSTALL); idle_manager_->Observe( chrome::NOTIFICATION_EXTENSION_UNLOADED, content::Source<Profile>(browser()->profile()), @@ -558,7 +557,7 @@ TEST_F(IdleTest, UnloadOnly) { TEST_F(IdleTest, UnloadWhileListening) { ScopedListen listen(idle_manager_, extension_->id()); UnloadedExtensionInfo details(extension_.get(), - extension_misc::UNLOAD_REASON_UNINSTALL); + UnloadedExtensionInfo::REASON_UNINSTALL); idle_manager_->Observe( chrome::NOTIFICATION_EXTENSION_UNLOADED, content::Source<Profile>(browser()->profile()), diff --git a/chrome/browser/extensions/api/power/power_api_unittest.cc b/chrome/browser/extensions/api/power/power_api_unittest.cc index 2f55901..2014b48 100644 --- a/chrome/browser/extensions/api/power/power_api_unittest.cc +++ b/chrome/browser/extensions/api/power/power_api_unittest.cc @@ -164,7 +164,7 @@ class PowerApiTest : public BrowserWithTestWindowTest { // been unloaded. void UnloadExtension(extensions::Extension* extension) { UnloadedExtensionInfo details( - extension, extension_misc::UNLOAD_REASON_UNINSTALL); + extension, UnloadedExtensionInfo::REASON_UNINSTALL); PowerApiManager::GetInstance()->Observe( chrome::NOTIFICATION_EXTENSION_UNLOADED, content::Source<Profile>(browser()->profile()), diff --git a/chrome/browser/extensions/api/streams_private/streams_private_manifest_unittest.cc b/chrome/browser/extensions/api/streams_private/streams_private_manifest_unittest.cc index 76839f9..94d46c7 100644 --- a/chrome/browser/extensions/api/streams_private/streams_private_manifest_unittest.cc +++ b/chrome/browser/extensions/api/streams_private/streams_private_manifest_unittest.cc @@ -4,6 +4,7 @@ #include "base/strings/string_number_conversions.h" #include "chrome/common/extensions/extension_builder.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" #include "chrome/common/extensions/manifest_url_handler.h" #include "chrome/common/extensions/mime_types_handler.h" diff --git a/chrome/browser/extensions/api/tabs/windows_util.cc b/chrome/browser/extensions/api/tabs/windows_util.cc index 536609e..b1955fe 100644 --- a/chrome/browser/extensions/api/tabs/windows_util.cc +++ b/chrome/browser/extensions/api/tabs/windows_util.cc @@ -10,6 +10,7 @@ #include "chrome/browser/extensions/extension_function_dispatcher.h" #include "chrome/browser/extensions/window_controller.h" #include "chrome/browser/extensions/window_controller_list.h" +#include "chrome/common/extensions/extension_constants.h" #include "extensions/common/error_utils.h" namespace windows_util { diff --git a/chrome/browser/extensions/component_loader_unittest.cc b/chrome/browser/extensions/component_loader_unittest.cc index d305c97..831562c 100644 --- a/chrome/browser/extensions/component_loader_unittest.cc +++ b/chrome/browser/extensions/component_loader_unittest.cc @@ -42,7 +42,7 @@ class MockExtensionService : public TestExtensionService { virtual void UnloadExtension( const std::string& extension_id, - extension_misc::UnloadedExtensionReason reason) OVERRIDE { + UnloadedExtensionInfo::Reason reason) OVERRIDE { ASSERT_TRUE(extension_set_.Contains(extension_id)); // Remove the extension with the matching id. extension_set_.Remove(extension_id); @@ -51,7 +51,7 @@ class MockExtensionService : public TestExtensionService { virtual void RemoveComponentExtension(const std::string & extension_id) OVERRIDE { - UnloadExtension(extension_id, extension_misc::UNLOAD_REASON_DISABLE); + UnloadExtension(extension_id, UnloadedExtensionInfo::REASON_DISABLE); } virtual bool is_ready() OVERRIDE { diff --git a/chrome/browser/extensions/default_apps.cc b/chrome/browser/extensions/default_apps.cc index 957a935..73fc05d7 100644 --- a/chrome/browser/extensions/default_apps.cc +++ b/chrome/browser/extensions/default_apps.cc @@ -15,6 +15,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_version_info.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/pref_names.h" #include "ui/base/l10n/l10n_util.h" diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc index 0d6fd91e..6811bfc 100644 --- a/chrome/browser/extensions/extension_browsertest.cc +++ b/chrome/browser/extensions/extension_browsertest.cc @@ -487,7 +487,8 @@ void ExtensionBrowserTest::ReloadExtension(const std::string extension_id) { void ExtensionBrowserTest::UnloadExtension(const std::string& extension_id) { ExtensionService* service = extensions::ExtensionSystem::Get( profile())->extension_service(); - service->UnloadExtension(extension_id, extension_misc::UNLOAD_REASON_DISABLE); + service->UnloadExtension(extension_id, + extensions::UnloadedExtensionInfo::REASON_DISABLE); } void ExtensionBrowserTest::UninstallExtension(const std::string& extension_id) { diff --git a/chrome/browser/extensions/extension_info_map.cc b/chrome/browser/extensions/extension_info_map.cc index e7549d2..10fa8c3 100644 --- a/chrome/browser/extensions/extension_info_map.cc +++ b/chrome/browser/extensions/extension_info_map.cc @@ -13,6 +13,7 @@ using content::BrowserThread; using extensions::Extension; +using extensions::UnloadedExtensionInfo; namespace { @@ -54,13 +55,14 @@ void ExtensionInfoMap::AddExtension(const Extension* extension, extra_data_[extension->id()].incognito_enabled = incognito_enabled; } -void ExtensionInfoMap::RemoveExtension(const std::string& extension_id, - const extension_misc::UnloadedExtensionReason reason) { +void ExtensionInfoMap::RemoveExtension( + const std::string& extension_id, + const UnloadedExtensionInfo::Reason reason) { CheckOnValidThread(); const Extension* extension = extensions_.GetByID(extension_id); extra_data_.erase(extension_id); // we don't care about disabled extra data - bool was_uninstalled = (reason != extension_misc::UNLOAD_REASON_DISABLE && - reason != extension_misc::UNLOAD_REASON_TERMINATE); + bool was_uninstalled = (reason != UnloadedExtensionInfo::REASON_DISABLE && + reason != UnloadedExtensionInfo::REASON_TERMINATE); if (extension) { if (!was_uninstalled) disabled_extensions_.Insert(extension); diff --git a/chrome/browser/extensions/extension_info_map.h b/chrome/browser/extensions/extension_info_map.h index cfbf6c6..53c04f5 100644 --- a/chrome/browser/extensions/extension_info_map.h +++ b/chrome/browser/extensions/extension_info_map.h @@ -13,7 +13,6 @@ #include "base/time/time.h" #include "chrome/browser/extensions/extensions_quota_service.h" #include "chrome/browser/extensions/process_map.h" -#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_set.h" namespace extensions { @@ -41,7 +40,7 @@ class ExtensionInfoMap : public base::RefCountedThreadSafe<ExtensionInfoMap> { // Callback for when an extension is unloaded. void RemoveExtension(const std::string& extension_id, - const extension_misc::UnloadedExtensionReason reason); + const extensions::UnloadedExtensionInfo::Reason 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 9439cf3..dac4e0a 100644 --- a/chrome/browser/extensions/extension_info_map_unittest.cc +++ b/chrome/browser/extensions/extension_info_map_unittest.cc @@ -102,7 +102,7 @@ TEST_F(ExtensionInfoMapTest, RefCounting) { // Remove extension2, and the extension2 object should have the only ref. info_map->RemoveExtension( - extension2->id(), extension_misc::UNLOAD_REASON_UNINSTALL); + extension2->id(), extensions::UnloadedExtensionInfo::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_notification_observer.cc b/chrome/browser/extensions/extension_notification_observer.cc index 7f5baf9..b06c0bb 100644 --- a/chrome/browser/extensions/extension_notification_observer.cc +++ b/chrome/browser/extensions/extension_notification_observer.cc @@ -116,7 +116,7 @@ void ExtensionNotificationObserver::Observe( notifications_.push_back(static_cast<chrome::NotificationType>(type)); // The only way that extensions are unloaded in these tests is // by blacklisting. - EXPECT_EQ(extension_misc::UNLOAD_REASON_BLACKLIST, + EXPECT_EQ(UnloadedExtensionInfo::REASON_BLACKLIST, reason->reason); } break; diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h index a079c0e..f9d9310a 100644 --- a/chrome/browser/extensions/extension_prefs.h +++ b/chrome/browser/extensions/extension_prefs.h @@ -17,6 +17,7 @@ #include "chrome/browser/extensions/extension_scoped_prefs.h" #include "chrome/browser/prefs/scoped_user_pref_update.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "components/browser_context_keyed_service/browser_context_keyed_service.h" #include "extensions/common/url_pattern_set.h" #include "sync/api/string_ordinal.h" diff --git a/chrome/browser/extensions/extension_protocols_unittest.cc b/chrome/browser/extensions/extension_protocols_unittest.cc index 300ac1d..e323cd5 100644 --- a/chrome/browser/extensions/extension_protocols_unittest.cc +++ b/chrome/browser/extensions/extension_protocols_unittest.cc @@ -234,7 +234,7 @@ TEST_F(ExtensionProtocolTest, ComponentResourceRequest) { // And then test it with the extension disabled. extension_info_map_->RemoveExtension(extension->id(), - extension_misc::UNLOAD_REASON_DISABLE); + UnloadedExtensionInfo::REASON_DISABLE); { net::URLRequest request(extension->GetResourceURL("webstore_icon_16.png"), &test_delegate_, diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc index c560220..1e373f8 100644 --- a/chrome/browser/extensions/extension_service.cc +++ b/chrome/browser/extensions/extension_service.cc @@ -834,7 +834,7 @@ bool ExtensionService::UninstallExtension( // Unload before doing more cleanup to ensure that nothing is hanging on to // any of these resources. - UnloadExtension(extension_id, extension_misc::UNLOAD_REASON_UNINSTALL); + UnloadExtension(extension_id, UnloadedExtensionInfo::REASON_UNINSTALL); // Tell the backend to start deleting installed extensions on the file thread. if (!Manifest::IsUnpackedLocation(extension->location())) { @@ -1024,7 +1024,7 @@ void ExtensionService::DisableExtension( extension_prefs_->SetKnownDisabled(disabled_extensions_.GetIDs()); if (extensions_.Contains(extension->id())) { extensions_.Remove(extension->id()); - NotifyExtensionUnloaded(extension, extension_misc::UNLOAD_REASON_DISABLE); + NotifyExtensionUnloaded(extension, UnloadedExtensionInfo::REASON_DISABLE); } else { terminated_extensions_.Remove(extension->id()); } @@ -1183,7 +1183,7 @@ void ExtensionService::NotifyExtensionLoaded(const Extension* extension) { void ExtensionService::NotifyExtensionUnloaded( const Extension* extension, - extension_misc::UnloadedExtensionReason reason) { + UnloadedExtensionInfo::Reason reason) { UnloadedExtensionInfo details(extension, reason); content::NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_UNLOADED, @@ -1280,7 +1280,7 @@ void ExtensionService::CheckManagementPolicy() { // UnloadExtension will change the extensions_ list. So, we should // call it outside the iterator loop. for (size_t i = 0; i < to_be_removed.size(); ++i) - UnloadExtension(to_be_removed[i], extension_misc::UNLOAD_REASON_DISABLE); + UnloadExtension(to_be_removed[i], UnloadedExtensionInfo::REASON_DISABLE); } void ExtensionService::CheckForUpdatesSoon() { @@ -1869,7 +1869,7 @@ void ExtensionService::UpdateExternalExtensionAlert() { void ExtensionService::UnloadExtension( const std::string& extension_id, - extension_misc::UnloadedExtensionReason reason) { + UnloadedExtensionInfo::Reason reason) { // Make sure the extension gets deleted after we return from this function. int include_mask = INCLUDE_EVERYTHING & ~INCLUDE_TERMINATED; scoped_refptr<const Extension> extension( @@ -1885,7 +1885,7 @@ void ExtensionService::UnloadExtension( } // If uninstalling let RuntimeEventRouter know. - if (reason == extension_misc::UNLOAD_REASON_UNINSTALL) + if (reason == UnloadedExtensionInfo::REASON_UNINSTALL) extensions::RuntimeEventRouter::OnExtensionUninstalled( profile_, extension_id); @@ -1921,7 +1921,7 @@ void ExtensionService::RemoveComponentExtension( const std::string& extension_id) { scoped_refptr<const Extension> extension( GetExtensionById(extension_id, false)); - UnloadExtension(extension_id, extension_misc::UNLOAD_REASON_UNINSTALL); + UnloadExtension(extension_id, UnloadedExtensionInfo::REASON_UNINSTALL); content::NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_UNINSTALLED, content::Source<Profile>(profile_), @@ -2063,7 +2063,7 @@ void ExtensionService::AddExtension(const Extension* extension) { if (is_extension_installed && !reloading) { // To upgrade an extension in place, unload the old one and then load the // new one. ReloadExtension disables the extension, which is sufficient. - UnloadExtension(extension->id(), extension_misc::UNLOAD_REASON_UPDATE); + UnloadExtension(extension->id(), UnloadedExtensionInfo::REASON_UPDATE); } if (extension_prefs_->IsExtensionBlacklisted(extension->id())) { @@ -2635,7 +2635,7 @@ void ExtensionService::TrackTerminatedExtension(const Extension* extension) { if (!terminated_extensions_.Contains(extension->id())) terminated_extensions_.Insert(make_scoped_refptr(extension)); - UnloadExtension(extension->id(), extension_misc::UNLOAD_REASON_TERMINATE); + UnloadExtension(extension->id(), UnloadedExtensionInfo::REASON_TERMINATE); } void ExtensionService::UntrackTerminatedExtension(const std::string& id) { @@ -3120,7 +3120,7 @@ void ExtensionService::ManageBlacklist(const std::set<std::string>& updated) { } blacklisted_extensions_.Insert(extension); extension_prefs_->SetExtensionBlacklisted(extension->id(), true); - UnloadExtension(*it, extension_misc::UNLOAD_REASON_BLACKLIST); + UnloadExtension(*it, UnloadedExtensionInfo::REASON_BLACKLIST); UMA_HISTOGRAM_ENUMERATION("ExtensionBlacklist.BlacklistInstalled", extension->location(), Manifest::NUM_LOCATIONS); } diff --git a/chrome/browser/extensions/extension_service.h b/chrome/browser/extensions/extension_service.h index e9e7cba..0c46096 100644 --- a/chrome/browser/extensions/extension_service.h +++ b/chrome/browser/extensions/extension_service.h @@ -121,7 +121,7 @@ class ExtensionServiceInterface : public syncer::SyncableService { virtual void UnloadExtension( const std::string& extension_id, - extension_misc::UnloadedExtensionReason reason) = 0; + extensions::UnloadedExtensionInfo::Reason reason) = 0; virtual void RemoveComponentExtension(const std::string& extension_id) = 0; virtual void SyncExtensionChangeIfNeeded( @@ -327,7 +327,7 @@ class ExtensionService // Unload the specified extension. virtual void UnloadExtension( const std::string& extension_id, - extension_misc::UnloadedExtensionReason reason) OVERRIDE; + extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE; // Remove the specified component extension. virtual void RemoveComponentExtension(const std::string& extension_id) @@ -726,8 +726,9 @@ class ExtensionService void NotifyExtensionLoaded(const extensions::Extension* extension); // Handles sending notification that |extension| was unloaded. - void NotifyExtensionUnloaded(const extensions::Extension* extension, - extension_misc::UnloadedExtensionReason reason); + void NotifyExtensionUnloaded( + const extensions::Extension* extension, + extensions::UnloadedExtensionInfo::Reason reason); // Common helper to finish installing the given extension. void FinishInstallation(const extensions::Extension* extension); diff --git a/chrome/browser/extensions/extension_system.cc b/chrome/browser/extensions/extension_system.cc index ddb687d..6ed7220 100644 --- a/chrome/browser/extensions/extension_system.cc +++ b/chrome/browser/extensions/extension_system.cc @@ -406,7 +406,7 @@ void ExtensionSystemImpl::RegisterExtensionWithRequestContexts( void ExtensionSystemImpl::UnregisterExtensionWithRequestContexts( const std::string& extension_id, - const extension_misc::UnloadedExtensionReason reason) { + const UnloadedExtensionInfo::Reason reason) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::Bind(&ExtensionInfoMap::RemoveExtension, info_map(), diff --git a/chrome/browser/extensions/extension_system.h b/chrome/browser/extensions/extension_system.h index c88fc74..07cbfb6 100644 --- a/chrome/browser/extensions/extension_system.h +++ b/chrome/browser/extensions/extension_system.h @@ -9,7 +9,7 @@ #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" -#include "chrome/common/extensions/extension_constants.h" +#include "chrome/common/extensions/extension.h" #include "components/browser_context_keyed_service/browser_context_keyed_service.h" #include "extensions/common/one_shot_event.h" @@ -116,7 +116,7 @@ class ExtensionSystem : public BrowserContextKeyedService { // EXTENSION_UNLOADED notification have finished running. virtual void UnregisterExtensionWithRequestContexts( const std::string& extension_id, - const extension_misc::UnloadedExtensionReason reason) {} + const UnloadedExtensionInfo::Reason reason) {} // Signaled when the extension system has completed its startup tasks. virtual const OneShotEvent& ready() const = 0; @@ -157,7 +157,7 @@ class ExtensionSystemImpl : public ExtensionSystem { virtual void UnregisterExtensionWithRequestContexts( const std::string& extension_id, - const extension_misc::UnloadedExtensionReason reason) OVERRIDE; + const UnloadedExtensionInfo::Reason reason) OVERRIDE; virtual const OneShotEvent& ready() const OVERRIDE; diff --git a/chrome/browser/extensions/image_loader_unittest.cc b/chrome/browser/extensions/image_loader_unittest.cc index 05cea06..a8f0d15 100644 --- a/chrome/browser/extensions/image_loader_unittest.cc +++ b/chrome/browser/extensions/image_loader_unittest.cc @@ -29,6 +29,7 @@ using extensions::Extension; using extensions::ExtensionResource; using extensions::ImageLoader; using extensions::Manifest; +using extensions::UnloadedExtensionInfo; class ImageLoaderTest : public testing::Test { public: @@ -169,12 +170,12 @@ TEST_F(ImageLoaderTest, DeleteExtensionWhileWaitingForCache) { EXPECT_EQ(0, image_loaded_count()); // Send out notification the extension was uninstalled. - extensions::UnloadedExtensionInfo details(extension.get(), - extension_misc::UNLOAD_REASON_UNINSTALL); + UnloadedExtensionInfo details(extension.get(), + UnloadedExtensionInfo::REASON_UNINSTALL); content::NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_UNLOADED, content::NotificationService::AllSources(), - content::Details<extensions::UnloadedExtensionInfo>(&details)); + content::Details<UnloadedExtensionInfo>(&details)); // Chuck the extension, that way if anyone tries to access it we should crash // or get valgrind errors. diff --git a/chrome/browser/extensions/menu_manager_unittest.cc b/chrome/browser/extensions/menu_manager_unittest.cc index 5fef312..d15097b 100644 --- a/chrome/browser/extensions/menu_manager_unittest.cc +++ b/chrome/browser/extensions/menu_manager_unittest.cc @@ -23,7 +23,6 @@ #include "chrome/common/chrome_paths.h" #include "chrome/common/extensions/api/context_menus.h" #include "chrome/common/extensions/extension.h" -#include "chrome/common/extensions/extension_constants.h" #include "chrome/test/base/testing_profile.h" #include "content/public/browser/notification_service.h" #include "content/public/common/context_menu_params.h" @@ -436,7 +435,7 @@ TEST_F(MenuManagerTest, ExtensionUnloadRemovesMenuItems) { // Notify that the extension was unloaded, and make sure the right item is // gone. UnloadedExtensionInfo details( - extension1, extension_misc::UNLOAD_REASON_DISABLE); + extension1, UnloadedExtensionInfo::REASON_DISABLE); notifier->Notify(chrome::NOTIFICATION_EXTENSION_UNLOADED, content::Source<Profile>(&profile_), content::Details<UnloadedExtensionInfo>( diff --git a/chrome/browser/extensions/test_extension_service.cc b/chrome/browser/extensions/test_extension_service.cc index d274314..19b50ba 100644 --- a/chrome/browser/extensions/test_extension_service.cc +++ b/chrome/browser/extensions/test_extension_service.cc @@ -126,7 +126,7 @@ void TestExtensionService::AddComponentExtension(const Extension* extension) { void TestExtensionService::UnloadExtension( const std::string& extension_id, - extension_misc::UnloadedExtensionReason reason) { + extensions::UnloadedExtensionInfo::Reason reason) { ADD_FAILURE(); } diff --git a/chrome/browser/extensions/test_extension_service.h b/chrome/browser/extensions/test_extension_service.h index 5373843..faff352 100644 --- a/chrome/browser/extensions/test_extension_service.h +++ b/chrome/browser/extensions/test_extension_service.h @@ -75,7 +75,7 @@ class TestExtensionService : public ExtensionServiceInterface { virtual void UnloadExtension( const std::string& extension_id, - extension_misc::UnloadedExtensionReason reason) OVERRIDE; + extensions::UnloadedExtensionInfo::Reason reason) OVERRIDE; virtual void RemoveComponentExtension(const std::string & extension_id) OVERRIDE; diff --git a/chrome/browser/extensions/user_script_listener_unittest.cc b/chrome/browser/extensions/user_script_listener_unittest.cc index 1f5dc67..dfc81dd 100644 --- a/chrome/browser/extensions/user_script_listener_unittest.cc +++ b/chrome/browser/extensions/user_script_listener_unittest.cc @@ -193,7 +193,7 @@ class UserScriptListenerTest : public ExtensionServiceTestBase { void UnloadTestExtension() { ASSERT_FALSE(service_->extensions()->is_empty()); service_->UnloadExtension((*service_->extensions()->begin())->id(), - extension_misc::UNLOAD_REASON_DISABLE); + UnloadedExtensionInfo::REASON_DISABLE); } scoped_refptr<UserScriptListener> listener_; diff --git a/chrome/browser/performance_monitor/performance_monitor.cc b/chrome/browser/performance_monitor/performance_monitor.cc index aba1173..aa96324 100644 --- a/chrome/browser/performance_monitor/performance_monitor.cc +++ b/chrome/browser/performance_monitor/performance_monitor.cc @@ -45,6 +45,7 @@ using content::BrowserThread; using extensions::Extension; +using extensions::UnloadedExtensionInfo; namespace performance_monitor { @@ -564,11 +565,11 @@ void PerformanceMonitor::Observe(int type, break; } case chrome::NOTIFICATION_EXTENSION_UNLOADED: { - const extensions::UnloadedExtensionInfo* info = - content::Details<extensions::UnloadedExtensionInfo>(details).ptr(); + const UnloadedExtensionInfo* info = + content::Details<UnloadedExtensionInfo>(details).ptr(); // Check if the extension was unloaded because it was disabled. - if (info->reason == extension_misc::UNLOAD_REASON_DISABLE) { + if (info->reason == UnloadedExtensionInfo::REASON_DISABLE) { AddExtensionEvent(EVENT_EXTENSION_DISABLE, info->extension); } diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc index 69dba1c..767b069 100644 --- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc +++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc @@ -34,6 +34,7 @@ #include "chrome/browser/ui/auto_login_prompter.h" #include "chrome/browser/ui/login/login_prompt.h" #include "chrome/browser/ui/sync/one_click_signin_helper.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/mime_types_handler.h" #include "chrome/common/render_messages.h" #include "content/public/browser/browser_thread.h" diff --git a/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_fake_unittest.cc b/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_fake_unittest.cc index 912bbb9..f977eed 100644 --- a/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_fake_unittest.cc +++ b/chrome/browser/sync_file_system/drive_backend_v1/drive_file_sync_service_fake_unittest.cc @@ -297,7 +297,7 @@ class DriveFileSyncServiceFakeTest : public testing::Test { // Call UnloadExtension instead of UninstallExtension since it does // unnecessary cleanup (e.g. deleting extension data) and emits warnings. extension_service_->UnloadExtension( - extension_id, extension_misc::UNLOAD_REASON_UNINSTALL); + extension_id, extensions::UnloadedExtensionInfo::REASON_UNINSTALL); } void UpdateRegisteredOrigins() { diff --git a/chrome/browser/sync_file_system/sync_file_system_service.cc b/chrome/browser/sync_file_system/sync_file_system_service.cc index fef33f5..f4239fd 100644 --- a/chrome/browser/sync_file_system/sync_file_system_service.cc +++ b/chrome/browser/sync_file_system/sync_file_system_service.cc @@ -659,7 +659,7 @@ void SyncFileSystemService::HandleExtensionUnloaded( int type, const content::NotificationDetails& details) { content::Details<const extensions::UnloadedExtensionInfo> info(details); - if (info->reason != extension_misc::UNLOAD_REASON_DISABLE) + if (info->reason != extensions::UnloadedExtensionInfo::REASON_DISABLE) return; std::string extension_id = info->extension->id(); diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc index 238824b..90a3c8c 100644 --- a/chrome/browser/themes/theme_service.cc +++ b/chrome/browser/themes/theme_service.cc @@ -37,6 +37,7 @@ using content::BrowserThread; using content::UserMetricsAction; using extensions::Extension; +using extensions::UnloadedExtensionInfo; using ui::ResourceBundle; typedef ThemeProperties Properties; @@ -257,9 +258,8 @@ void ThemeService::Observe(int type, } case chrome::NOTIFICATION_EXTENSION_UNLOADED: { - Details<const extensions::UnloadedExtensionInfo> unloaded_details( - details); - if (unloaded_details->reason != extension_misc::UNLOAD_REASON_UPDATE && + Details<const UnloadedExtensionInfo> unloaded_details(details); + if (unloaded_details->reason != UnloadedExtensionInfo::REASON_UPDATE && unloaded_details->extension->is_theme() && unloaded_details->extension->id() == GetThemeID()) { UseDefaultTheme(); diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc index 780c3b5..5bca6e2 100644 --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc @@ -88,6 +88,7 @@ #endif using extensions::Extension; +using extensions::UnloadedExtensionInfo; using extension_misc::kGmailAppId; using content::WebContents; @@ -1055,19 +1056,18 @@ void ChromeLauncherController::Observe( break; } case chrome::NOTIFICATION_EXTENSION_UNLOADED: { - const content::Details<extensions::UnloadedExtensionInfo>& unload_info( - details); + const content::Details<UnloadedExtensionInfo>& unload_info(details); const Extension* extension = unload_info->extension; const std::string& id = extension->id(); // Since we might have windowed apps of this type which might have // outstanding locks which needs to be removed. if (GetLauncherIDForAppID(id) && - unload_info->reason == extension_misc::UNLOAD_REASON_UNINSTALL) { + unload_info->reason == UnloadedExtensionInfo::REASON_UNINSTALL) { CloseWindowedAppsFromRemovedExtension(id); } if (IsAppPinned(id)) { - if (unload_info->reason == extension_misc::UNLOAD_REASON_UNINSTALL) { + if (unload_info->reason == UnloadedExtensionInfo::REASON_UNINSTALL) { DoUnpinAppWithID(id); app_icon_loader_->ClearImage(id); } else { diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc index 45e281a..149d599 100644 --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc @@ -47,6 +47,7 @@ using extensions::Extension; using extensions::Manifest; +using extensions::UnloadedExtensionInfo; namespace { const char* offline_gmail_url = "https://mail.google.com/mail/mu/u"; @@ -949,16 +950,16 @@ TEST_F(ChromeLauncherControllerTest, RestoreDefaultAppsResyncOrder) { // Check that unloading of extensions works as expected. extension_service_->UnloadExtension(extension1_->id(), - extension_misc::UNLOAD_REASON_UNINSTALL); + UnloadedExtensionInfo::REASON_UNINSTALL); EXPECT_EQ("AppList, Chrome, App3, App2, ", GetPinnedAppStatus()); extension_service_->UnloadExtension(extension2_->id(), - extension_misc::UNLOAD_REASON_UNINSTALL); + UnloadedExtensionInfo::REASON_UNINSTALL); EXPECT_EQ("AppList, Chrome, App3, ", GetPinnedAppStatus()); // Check that an update of an extension does not crash the system. extension_service_->UnloadExtension(extension3_->id(), - extension_misc::UNLOAD_REASON_UPDATE); + UnloadedExtensionInfo::REASON_UPDATE); EXPECT_EQ("AppList, Chrome, App3, ", GetPinnedAppStatus()); } @@ -1412,7 +1413,7 @@ TEST_F(ChromeLauncherControllerTest, UnpinWithUninstall) { EXPECT_TRUE(launcher_controller_->IsAppPinned(extension4_->id())); extension_service_->UnloadExtension(extension3_->id(), - extension_misc::UNLOAD_REASON_UNINSTALL); + UnloadedExtensionInfo::REASON_UNINSTALL); EXPECT_FALSE(launcher_controller_->IsAppPinned(extension3_->id())); EXPECT_TRUE(launcher_controller_->IsAppPinned(extension4_->id())); diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index e56c71d..b18039a 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -142,7 +142,6 @@ #include "chrome/common/custom_handlers/protocol_handler.h" #include "chrome/common/extensions/background_info.h" #include "chrome/common/extensions/extension.h" -#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/net/url_fixer_upper.h" #include "chrome/common/pref_names.h" #include "chrome/common/profiling.h" @@ -1802,7 +1801,8 @@ void Browser::Observe(int type, // Close any tabs from the unloaded extension, unless it's terminated, // in which case let the sad tabs remain. - if (extension_info->reason != extension_misc::UNLOAD_REASON_TERMINATE) { + if (extension_info->reason != + extensions::UnloadedExtensionInfo::REASON_TERMINATE) { const Extension* extension = extension_info->extension; // Iterate backwards as we may remove items while iterating. for (int i = tab_strip_model_->count() - 1; i >= 0; --i) { diff --git a/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm index bf9c9e6..d6495df 100644 --- a/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm +++ b/chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm @@ -14,6 +14,7 @@ #include "chrome/browser/extensions/bundle_installer.h" #import "chrome/browser/ui/chrome_style.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "content/public/browser/page_navigator.h" #include "grit/generated_resources.h" #include "skia/ext/skia_utils_mac.h" diff --git a/chrome/browser/ui/gtk/extensions/extension_install_dialog_gtk.cc b/chrome/browser/ui/gtk/extensions/extension_install_dialog_gtk.cc index 73adcd0..f2c2055 100644 --- a/chrome/browser/ui/gtk/extensions/extension_install_dialog_gtk.cc +++ b/chrome/browser/ui/gtk/extensions/extension_install_dialog_gtk.cc @@ -14,6 +14,7 @@ #include "chrome/browser/ui/gtk/gtk_chrome_link_button.h" #include "chrome/browser/ui/gtk/gtk_util.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "content/public/browser/page_navigator.h" #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_view.h" diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc index 341c903..0549d50 100644 --- a/chrome/browser/ui/panels/panel_browsertest.cc +++ b/chrome/browser/ui/panels/panel_browsertest.cc @@ -1421,7 +1421,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, // Send unload notification on the first extension. extensions::UnloadedExtensionInfo details( - extension.get(), extension_misc::UNLOAD_REASON_UNINSTALL); + extension.get(), extensions::UnloadedExtensionInfo::REASON_UNINSTALL); content::NotificationService::current()->Notify( chrome::NOTIFICATION_EXTENSION_UNLOADED, content::Source<Profile>(browser()->profile()), diff --git a/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc b/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc index 5575e9f..379871b 100644 --- a/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc +++ b/chrome/browser/ui/views/extensions/extension_install_dialog_view.cc @@ -16,6 +16,7 @@ #include "chrome/browser/ui/views/constrained_window_views.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/installer/util/browser_distribution.h" #include "content/public/browser/page_navigator.h" #include "content/public/browser/web_contents.h" diff --git a/chrome/browser/ui/webui/extensions/chromeos/kiosk_apps_handler.cc b/chrome/browser/ui/webui/extensions/chromeos/kiosk_apps_handler.cc index 3efe894..8eb1838 100644 --- a/chrome/browser/ui/webui/extensions/chromeos/kiosk_apps_handler.cc +++ b/chrome/browser/ui/webui/extensions/chromeos/kiosk_apps_handler.cc @@ -17,6 +17,7 @@ #include "chrome/browser/chromeos/login/user_manager.h" #include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "chromeos/chromeos_switches.h" #include "chromeos/settings/cros_settings_names.h" #include "content/public/browser/web_ui.h" diff --git a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc index 9be9f30..70a048f 100644 --- a/chrome/browser/ui/webui/ntp/app_launcher_handler.cc +++ b/chrome/browser/ui/webui/ntp/app_launcher_handler.cc @@ -60,6 +60,7 @@ using content::WebContents; using extensions::CrxInstaller; using extensions::Extension; using extensions::ExtensionPrefs; +using extensions::UnloadedExtensionInfo; namespace { @@ -283,8 +284,8 @@ void AppLauncherHandler::Observe(int type, extension = content::Details<const Extension>(details).ptr(); uninstalled = true; } else { // NOTIFICATION_EXTENSION_UNLOADED - if (content::Details<extensions::UnloadedExtensionInfo>( - details)->reason == extension_misc::UNLOAD_REASON_UNINSTALL) { + if (content::Details<UnloadedExtensionInfo>(details)->reason == + UnloadedExtensionInfo::REASON_UNINSTALL) { // Uninstalls are tracked by NOTIFICATION_EXTENSION_UNINSTALLED. return; } diff --git a/chrome/common/extensions/api/extension_action/action_info.cc b/chrome/common/extensions/api/extension_action/action_info.cc index b6fa5ec..423e33f 100644 --- a/chrome/common/extensions/api/extension_action/action_info.cc +++ b/chrome/common/extensions/api/extension_action/action_info.cc @@ -8,6 +8,7 @@ #include "base/strings/utf_string_conversions.h" #include "chrome/common/extensions/api/commands/commands_handler.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/manifest_handler_helpers.h" #include "extensions/common/error_utils.h" #include "extensions/common/manifest_constants.h" diff --git a/chrome/common/extensions/api/extension_action/page_action_manifest_unittest.cc b/chrome/common/extensions/api/extension_action/page_action_manifest_unittest.cc index c73cfed..993e1d0 100644 --- a/chrome/common/extensions/api/extension_action/page_action_manifest_unittest.cc +++ b/chrome/common/extensions/api/extension_action/page_action_manifest_unittest.cc @@ -4,6 +4,7 @@ #include "chrome/common/extensions/api/extension_action/action_info.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" #include "extensions/common/error_utils.h" #include "extensions/common/manifest_constants.h" diff --git a/chrome/common/extensions/api/file_browser_handlers/file_browser_handler_manifest_unittest.cc b/chrome/common/extensions/api/file_browser_handlers/file_browser_handler_manifest_unittest.cc index 1ce1ac7..797a11f 100644 --- a/chrome/common/extensions/api/file_browser_handlers/file_browser_handler_manifest_unittest.cc +++ b/chrome/common/extensions/api/file_browser_handlers/file_browser_handler_manifest_unittest.cc @@ -5,6 +5,7 @@ #include "base/strings/string_number_conversions.h" #include "chrome/common/extensions/api/file_browser_handlers/file_browser_handler.h" #include "chrome/common/extensions/extension_builder.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" #include "chrome/common/extensions/value_builder.h" #include "extensions/common/error_utils.h" diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc index 1855691..920f9cb 100644 --- a/chrome/common/extensions/extension.cc +++ b/chrome/common/extensions/extension.cc @@ -20,6 +20,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/values.h" #include "base/version.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/manifest_handler.h" #include "chrome/common/extensions/permissions/permission_set.h" #include "chrome/common/extensions/permissions/permissions_data.h" @@ -834,7 +835,7 @@ InstalledExtensionInfo::InstalledExtensionInfo( UnloadedExtensionInfo::UnloadedExtensionInfo( const Extension* extension, - extension_misc::UnloadedExtensionReason reason) + UnloadedExtensionInfo::Reason reason) : reason(reason), extension(extension) {} diff --git a/chrome/common/extensions/extension.h b/chrome/common/extensions/extension.h index 81a2c8b..913e0c24 100644 --- a/chrome/common/extensions/extension.h +++ b/chrome/common/extensions/extension.h @@ -20,7 +20,6 @@ #include "base/memory/scoped_ptr.h" #include "base/synchronization/lock.h" #include "base/threading/thread_checker.h" -#include "chrome/common/extensions/extension_constants.h" #include "extensions/common/extension_resource.h" #include "extensions/common/install_warning.h" #include "extensions/common/manifest.h" @@ -504,14 +503,20 @@ struct InstalledExtensionInfo { }; struct UnloadedExtensionInfo { - extension_misc::UnloadedExtensionReason reason; + enum Reason { + REASON_DISABLE, // Extension is being disabled. + REASON_UPDATE, // Extension is being updated to a newer version. + REASON_UNINSTALL, // Extension is being uninstalled. + REASON_TERMINATE, // Extension has terminated. + REASON_BLACKLIST, // Extension has been blacklisted. + }; + + Reason reason; // The extension being unloaded - this should always be non-NULL. const Extension* extension; - UnloadedExtensionInfo( - const Extension* extension, - extension_misc::UnloadedExtensionReason reason); + UnloadedExtensionInfo(const Extension* extension, Reason 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 7938d4f..b1cf82d8 100644 --- a/chrome/common/extensions/extension_constants.h +++ b/chrome/common/extensions/extension_constants.h @@ -285,14 +285,6 @@ namespace extension_misc { 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. - UNLOAD_REASON_TERMINATE, // Extension has terminated. - UNLOAD_REASON_BLACKLIST, // Extension has been blacklisted. - }; - // The states that an app can be in, as reported by chrome.app.installState // and chrome.app.runningState. extern const char kAppStateNotInstalled[]; diff --git a/chrome/common/extensions/extension_process_policy.cc b/chrome/common/extensions/extension_process_policy.cc index cb938ee..1008711 100644 --- a/chrome/common/extensions/extension_process_policy.cc +++ b/chrome/common/extensions/extension_process_policy.cc @@ -5,6 +5,7 @@ #include "chrome/common/extensions/extension_process_policy.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_set.h" #include "chrome/common/extensions/manifest_handlers/app_isolation_info.h" diff --git a/chrome/common/extensions/manifest_handlers/icons_handler.cc b/chrome/common/extensions/manifest_handlers/icons_handler.cc index 70b66ad..35de4f8 100644 --- a/chrome/common/extensions/manifest_handlers/icons_handler.cc +++ b/chrome/common/extensions/manifest_handlers/icons_handler.cc @@ -11,6 +11,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/values.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_file_util.h" #include "chrome/common/extensions/manifest_handler_helpers.h" #include "extensions/common/manifest_constants.h" diff --git a/chrome/common/extensions/manifest_url_handler.cc b/chrome/common/extensions/manifest_url_handler.cc index 24fbafa..538f1a9 100644 --- a/chrome/common/extensions/manifest_url_handler.cc +++ b/chrome/common/extensions/manifest_url_handler.cc @@ -12,6 +12,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/values.h" #include "chrome/common/chrome_constants.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_file_util.h" #include "chrome/common/extensions/permissions/permissions_data.h" #include "chrome/common/url_constants.h" diff --git a/chrome/common/extensions/permissions/permissions_data.cc b/chrome/common/extensions/permissions/permissions_data.cc index f252bd1..f5fe932 100644 --- a/chrome/common/extensions/permissions/permissions_data.cc +++ b/chrome/common/extensions/permissions/permissions_data.cc @@ -12,6 +12,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/values.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/permissions/chrome_scheme_hosts.h" #include "chrome/common/extensions/permissions/permission_set.h" #include "content/public/common/url_constants.h" diff --git a/chrome/renderer/extensions/app_bindings.cc b/chrome/renderer/extensions/app_bindings.cc index db3888b..112ee8c 100644 --- a/chrome/renderer/extensions/app_bindings.cc +++ b/chrome/renderer/extensions/app_bindings.cc @@ -10,6 +10,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/values.h" #include "chrome/common/chrome_switches.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/extension_set.h" #include "chrome/renderer/extensions/chrome_v8_context.h" diff --git a/chrome/renderer/extensions/extension_helper.cc b/chrome/renderer/extensions/extension_helper.cc index f717a78..b2de397 100644 --- a/chrome/renderer/extensions/extension_helper.cc +++ b/chrome/renderer/extensions/extension_helper.cc @@ -13,6 +13,7 @@ #include "base/strings/utf_string_conversions.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/api/messaging/message.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_messages.h" #include "chrome/common/render_messages.h" #include "chrome/common/url_constants.h" diff --git a/chrome/renderer/extensions/renderer_permissions_policy_delegate_unittest.cc b/chrome/renderer/extensions/renderer_permissions_policy_delegate_unittest.cc index 4d5d003..80825af 100644 --- a/chrome/renderer/extensions/renderer_permissions_policy_delegate_unittest.cc +++ b/chrome/renderer/extensions/renderer_permissions_policy_delegate_unittest.cc @@ -6,6 +6,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_builder.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_messages.h" #include "chrome/common/extensions/permissions/permissions_data.h" #include "chrome/renderer/extensions/dispatcher.h" diff --git a/chrome/renderer/extensions/webstore_bindings.cc b/chrome/renderer/extensions/webstore_bindings.cc index 9d11cb0..ad50c423 100644 --- a/chrome/renderer/extensions/webstore_bindings.cc +++ b/chrome/renderer/extensions/webstore_bindings.cc @@ -6,6 +6,7 @@ #include "base/strings/string_util.h" #include "chrome/common/extensions/extension.h" +#include "chrome/common/extensions/extension_constants.h" #include "chrome/common/extensions/extension_messages.h" #include "chrome/renderer/extensions/chrome_v8_context.h" #include "content/public/renderer/render_view.h" |