summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/app_window.cc4
-rw-r--r--apps/shell/browser/shell_extension_system.cc2
-rw-r--r--chrome/browser/apps/app_browsertest.cc7
-rw-r--r--chrome/browser/apps/ephemeral_app_launcher.cc3
-rw-r--r--chrome/browser/apps/ephemeral_app_service.cc5
-rw-r--r--chrome/browser/apps/shortcut_manager.cc5
-rw-r--r--chrome/browser/chrome_notification_types.h4
-rw-r--r--chrome/browser/chromeos/policy/device_local_account_browsertest.cc4
-rw-r--r--chrome/browser/extensions/api/commands/command_service.cc4
-rw-r--r--chrome/browser/extensions/api/developer_private/developer_private_api.cc4
-rw-r--r--chrome/browser/extensions/api/management/management_api.cc4
-rw-r--r--chrome/browser/extensions/api/push_messaging/push_messaging_api.cc5
-rw-r--r--chrome/browser/extensions/api/storage/managed_value_store_cache.cc4
-rw-r--r--chrome/browser/extensions/convert_web_app_browsertest.cc5
-rw-r--r--chrome/browser/extensions/error_console/error_console.cc4
-rw-r--r--chrome/browser/extensions/extension_notification_observer.cc5
-rw-r--r--chrome/browser/extensions/extension_service.cc2
-rw-r--r--chrome/browser/extensions/extension_service_unittest.cc7
-rw-r--r--chrome/browser/extensions/extension_test_notification_observer.cc4
-rw-r--r--chrome/browser/extensions/state_store.cc8
-rw-r--r--chrome/browser/extensions/updater/extension_updater.cc5
-rw-r--r--chrome/browser/extensions/webstore_startup_installer_browsertest.cc5
-rw-r--r--chrome/browser/performance_monitor/performance_monitor.cc7
-rw-r--r--chrome/browser/policy/policy_browsertest.cc6
-rw-r--r--chrome/browser/search/hotword_service.cc6
-rw-r--r--chrome/browser/sync_file_system/sync_file_system_service.cc5
-rw-r--r--chrome/browser/themes/theme_service.cc5
-rw-r--r--extensions/browser/api/runtime/runtime_api.cc4
28 files changed, 74 insertions, 59 deletions
diff --git a/apps/app_window.cc b/apps/app_window.cc
index 2071892..6412b10 100644
--- a/apps/app_window.cc
+++ b/apps/app_window.cc
@@ -320,7 +320,7 @@ void AppWindow::Init(const GURL& url,
content::NotificationService::AllSources());
// Update the app menu if an ephemeral app becomes installed.
registrar_.Add(this,
- chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::Source<content::BrowserContext>(
client->GetOriginalContext(browser_context_)));
@@ -971,7 +971,7 @@ void AppWindow::Observe(int type,
native_app_window_->Close();
break;
}
- case chrome::NOTIFICATION_EXTENSION_INSTALLED: {
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED: {
const extensions::Extension* installed_extension =
content::Details<const extensions::InstalledExtensionInfo>(details)
->extension;
diff --git a/apps/shell/browser/shell_extension_system.cc b/apps/shell/browser/shell_extension_system.cc
index 2651d77..7d56884 100644
--- a/apps/shell/browser/shell_extension_system.cc
+++ b/apps/shell/browser/shell_extension_system.cc
@@ -58,7 +58,7 @@ bool ShellExtensionSystem::LoadAndLaunchApp(const base::FilePath& app_dir) {
// * Call PermissionsUpdater::GrantActivePermissions().
// * Call ExtensionService::SatisfyImports().
// * Call ExtensionPrefs::OnExtensionInstalled().
- // * Send NOTIFICATION_EXTENSION_INSTALLED.
+ // * Send NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED.
ExtensionRegistry::Get(browser_context_)->AddEnabled(extension);
diff --git a/chrome/browser/apps/app_browsertest.cc b/chrome/browser/apps/app_browsertest.cc
index 0bf5f3a..6576a0a 100644
--- a/chrome/browser/apps/app_browsertest.cc
+++ b/chrome/browser/apps/app_browsertest.cc
@@ -949,13 +949,14 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, ReloadRelaunches) {
namespace {
-// Simple observer to check for NOTIFICATION_EXTENSION_INSTALLED events to
+// Simple observer to check for NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED
+// events to
// ensure installation does or does not occur in certain scenarios.
class CheckExtensionInstalledObserver : public content::NotificationObserver {
public:
CheckExtensionInstalledObserver() : seen_(false) {
registrar_.Add(this,
- chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::NotificationService::AllSources());
}
@@ -1017,7 +1018,7 @@ IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest,
// should not cause it to be re-installed. Instead, we wait for the OnLaunched
// in a different observer (which would timeout if not the app was not
// previously installed properly) and then check this observer to make sure it
- // never saw the NOTIFICATION_EXTENSION_INSTALLED event.
+ // never saw the NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED event.
CheckExtensionInstalledObserver should_not_install;
const Extension* extension = LoadExtensionAsComponent(
test_data_dir_.AppendASCII("platform_apps").AppendASCII("component"));
diff --git a/chrome/browser/apps/ephemeral_app_launcher.cc b/chrome/browser/apps/ephemeral_app_launcher.cc
index 0324d68..9aa495f 100644
--- a/chrome/browser/apps/ephemeral_app_launcher.cc
+++ b/chrome/browser/apps/ephemeral_app_launcher.cc
@@ -242,7 +242,8 @@ void EphemeralAppLauncher::CompleteInstall(const std::string& error) {
WebstoreStandaloneInstaller::CompleteInstall(error);
// If the installation succeeds, we reach this point as a result of
- // chrome::NOTIFICATION_EXTENSION_INSTALLED, but this is broadcasted before
+ // chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED, but this is
+ // broadcasted before
// ExtensionService has added the extension to its list of installed
// extensions and is too early to launch the app. Instead, we will launch at
// EphemeralAppLauncher::OnExtensionLoaded().
diff --git a/chrome/browser/apps/ephemeral_app_service.cc b/chrome/browser/apps/ephemeral_app_service.cc
index b8d4989..0e4e117 100644
--- a/chrome/browser/apps/ephemeral_app_service.cc
+++ b/chrome/browser/apps/ephemeral_app_service.cc
@@ -67,7 +67,8 @@ EphemeralAppService::EphemeralAppService(Profile* profile)
switches::kEnableEphemeralApps))
return;
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ registrar_.Add(this,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
content::Source<Profile>(profile_));
@@ -89,7 +90,7 @@ void EphemeralAppService::Observe(
Init();
break;
}
- case chrome::NOTIFICATION_EXTENSION_INSTALLED: {
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED: {
const Extension* extension =
content::Details<const InstalledExtensionInfo>(details)->extension;
DCHECK(extension);
diff --git a/chrome/browser/apps/shortcut_manager.cc b/chrome/browser/apps/shortcut_manager.cc
index ed4e24f..66ba3d7 100644
--- a/chrome/browser/apps/shortcut_manager.cc
+++ b/chrome/browser/apps/shortcut_manager.cc
@@ -75,7 +75,8 @@ AppShortcutManager::AppShortcutManager(Profile* profile)
content::BrowserThread::UI) ||
content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ registrar_.Add(this,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
content::Source<Profile>(profile_));
@@ -108,7 +109,7 @@ void AppShortcutManager::Observe(int type,
OnceOffCreateShortcuts();
break;
}
- case chrome::NOTIFICATION_EXTENSION_INSTALLED: {
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED: {
#if defined(OS_MACOSX)
if (!apps::IsAppShimsEnabled())
break;
diff --git a/chrome/browser/chrome_notification_types.h b/chrome/browser/chrome_notification_types.h
index 9303cac..8550eb7 100644
--- a/chrome/browser/chrome_notification_types.h
+++ b/chrome/browser/chrome_notification_types.h
@@ -418,9 +418,11 @@ enum NotificationType {
// UpdatedExtensionPermissionsInfo, and the source is a Profile.
NOTIFICATION_EXTENSION_PERMISSIONS_UPDATED,
+ // DEPRECATED: Use ExtensionRegistry::AddObserver instead.
+ //
// Sent when new extensions are installed, or existing extensions are updated.
// The details are an InstalledExtensionInfo, and the source is a Profile.
- NOTIFICATION_EXTENSION_INSTALLED,
+ NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
// An error occured during extension install. The details are a string with
// details about why the install failed.
diff --git a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
index 08b2d08..677cfa2 100644
--- a/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
+++ b/chrome/browser/chromeos/policy/device_local_account_browsertest.cc
@@ -730,7 +730,7 @@ IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, ExtensionsUncached) {
// Start listening for app/extension installation results.
content::WindowedNotificationObserver hosted_app_observer(
- chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
base::Bind(DoesInstallSuccessReferToId, kHostedAppID));
content::WindowedNotificationObserver extension_observer(
chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
@@ -825,7 +825,7 @@ IN_PROC_BROWSER_TEST_F(DeviceLocalAccountTest, ExtensionsCached) {
// Start listening for app/extension installation results.
content::WindowedNotificationObserver hosted_app_observer(
- chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
base::Bind(DoesInstallSuccessReferToId, kHostedAppID));
content::WindowedNotificationObserver extension_observer(
chrome::NOTIFICATION_EXTENSION_INSTALL_ERROR,
diff --git a/chrome/browser/extensions/api/commands/command_service.cc b/chrome/browser/extensions/api/commands/command_service.cc
index 23dc74f..a6ba60e 100644
--- a/chrome/browser/extensions/api/commands/command_service.cc
+++ b/chrome/browser/extensions/api/commands/command_service.cc
@@ -148,7 +148,7 @@ CommandService::CommandService(content::BrowserContext* context)
RegisterFunction<GetAllCommandsFunction>();
registrar_.Add(this,
- chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::Source<Profile>(profile_));
registrar_.Add(this,
chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
@@ -325,7 +325,7 @@ void CommandService::Observe(
const content::NotificationSource& source,
const content::NotificationDetails& details) {
switch (type) {
- case chrome::NOTIFICATION_EXTENSION_INSTALLED:
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED:
AssignInitialKeybindings(
content::Details<const InstalledExtensionInfo>(details)->extension);
break;
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
index 89754e1..d68cdfd 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
@@ -174,7 +174,7 @@ DeveloperPrivateAPI::DeveloperPrivateAPI(content::BrowserContext* context)
DeveloperPrivateEventRouter::DeveloperPrivateEventRouter(Profile* profile)
: profile_(profile) {
- int types[] = {chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ int types[] = {chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
@@ -217,7 +217,7 @@ void DeveloperPrivateEventRouter::Observe(
const Extension* extension = NULL;
switch (type) {
- case chrome::NOTIFICATION_EXTENSION_INSTALLED:
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED:
event_data.event_type = developer::EVENT_TYPE_INSTALLED;
extension =
content::Details<const InstalledExtensionInfo>(details)->extension;
diff --git a/chrome/browser/extensions/api/management/management_api.cc b/chrome/browser/extensions/api/management/management_api.cc
index c3bef71..88c9cb3 100644
--- a/chrome/browser/extensions/api/management/management_api.cc
+++ b/chrome/browser/extensions/api/management/management_api.cc
@@ -739,7 +739,7 @@ bool ManagementCreateAppShortcutFunction::RunAsync() {
ManagementEventRouter::ManagementEventRouter(Profile* profile)
: profile_(profile) {
- int types[] = {chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ int types[] = {chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED};
@@ -765,7 +765,7 @@ void ManagementEventRouter::Observe(
CHECK(profile_->IsSameProfile(profile));
switch (type) {
- case chrome::NOTIFICATION_EXTENSION_INSTALLED:
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED:
event_name = management::OnInstalled::kEventName;
extension =
content::Details<const InstalledExtensionInfo>(details)->extension;
diff --git a/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc b/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc
index e1effd90..053b445e 100644
--- a/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc
+++ b/chrome/browser/extensions/api/push_messaging/push_messaging_api.cc
@@ -290,7 +290,8 @@ PushMessagingAPI::PushMessagingAPI(content::BrowserContext* context)
: extension_registry_observer_(this),
profile_(Profile::FromBrowserContext(context)) {
extension_registry_observer_.Add(ExtensionRegistry::Get(profile_));
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ registrar_.Add(this,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::Source<Profile>(profile_->GetOriginalProfile()));
}
@@ -358,7 +359,7 @@ void PushMessagingAPI::OnExtensionUnloaded(
void PushMessagingAPI::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- DCHECK_EQ(type, chrome::NOTIFICATION_EXTENSION_INSTALLED);
+ DCHECK_EQ(type, chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED);
if (!InitEventRouterAndHandler())
return;
diff --git a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
index 814d949..5134fd5c 100644
--- a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
+++ b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
@@ -106,7 +106,7 @@ ManagedValueStoreCache::ExtensionTracker::ExtensionTracker(Profile* profile)
policy::SchemaRegistryServiceFactory::GetForContext(profile)),
weak_factory_(this) {
registrar_.Add(this,
- chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::Source<Profile>(profile_));
registrar_.Add(this,
chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
@@ -131,7 +131,7 @@ void ManagedValueStoreCache::ExtensionTracker::Observe(
return;
switch (type) {
- case chrome::NOTIFICATION_EXTENSION_INSTALLED: {
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED: {
scoped_ptr<ExtensionSet> added(new ExtensionSet);
added->Insert(
content::Details<InstalledExtensionInfo>(details)->extension);
diff --git a/chrome/browser/extensions/convert_web_app_browsertest.cc b/chrome/browser/extensions/convert_web_app_browsertest.cc
index 888cade..955e49c 100644
--- a/chrome/browser/extensions/convert_web_app_browsertest.cc
+++ b/chrome/browser/extensions/convert_web_app_browsertest.cc
@@ -42,7 +42,7 @@ class ExtensionFromWebAppTest
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE {
- if (type == chrome::NOTIFICATION_EXTENSION_INSTALLED) {
+ if (type == chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED) {
const Extension* extension =
content::Details<const InstalledExtensionInfo>(details)->extension;
if (extension->id() == expected_extension_id_) {
@@ -65,7 +65,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionFromWebAppTest, DISABLED_Basic) {
false);
content::NotificationRegistrar registrar;
- registrar.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ registrar.Add(this,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::NotificationService::AllSources());
expected_extension_id_ = "ffnmbohohhobhkjpfbefbjifapgcmpaa";
diff --git a/chrome/browser/extensions/error_console/error_console.cc b/chrome/browser/extensions/error_console/error_console.cc
index 73342d3..7cdfe5e 100644
--- a/chrome/browser/extensions/error_console/error_console.cc
+++ b/chrome/browser/extensions/error_console/error_console.cc
@@ -200,7 +200,7 @@ void ErrorConsole::Enable() {
content::Source<Profile>(profile_));
notification_registrar_.Add(
this,
- chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::Source<Profile>(profile_));
const ExtensionSet& extensions =
@@ -263,7 +263,7 @@ void ErrorConsole::Observe(int type,
// notifications from our own.
errors_.Remove(content::Details<Extension>(details).ptr()->id());
break;
- case chrome::NOTIFICATION_EXTENSION_INSTALLED: {
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED: {
const InstalledExtensionInfo* info =
content::Details<InstalledExtensionInfo>(details).ptr();
diff --git a/chrome/browser/extensions/extension_notification_observer.cc b/chrome/browser/extensions/extension_notification_observer.cc
index 11133c5..6d908d5 100644
--- a/chrome/browser/extensions/extension_notification_observer.cc
+++ b/chrome/browser/extensions/extension_notification_observer.cc
@@ -36,7 +36,8 @@ ExtensionNotificationObserver::ExtensionNotificationObserver(
: extension_ids_(extension_ids) {
registrar_.Add(
this, chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED, source);
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED, source);
+ registrar_.Add(
+ this, chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED, source);
registrar_.Add(
this, chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED, source);
}
@@ -95,7 +96,7 @@ void ExtensionNotificationObserver::Observe(
const content::NotificationSource& source,
const content::NotificationDetails& details) {
switch (type) {
- case chrome::NOTIFICATION_EXTENSION_INSTALLED: {
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED: {
const Extension* extension =
content::Details<const InstalledExtensionInfo>(details)->extension;
if (extension_ids_.count(extension->id()))
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 4d7e99f..e069715 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -1959,7 +1959,7 @@ void ExtensionService::FinishInstallation(const Extension* extension) {
}
extensions::InstalledExtensionInfo details(extension, is_update, old_name);
content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::Source<Profile>(profile_),
content::Details<const extensions::InstalledExtensionInfo>(&details));
diff --git a/chrome/browser/extensions/extension_service_unittest.cc b/chrome/browser/extensions/extension_service_unittest.cc
index 888092e..4225efb 100644
--- a/chrome/browser/extensions/extension_service_unittest.cc
+++ b/chrome/browser/extensions/extension_service_unittest.cc
@@ -678,7 +678,8 @@ class ExtensionServiceTest
content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
content::NotificationService::AllSources());
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ registrar_.Add(this,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::NotificationService::AllSources());
}
@@ -711,7 +712,7 @@ class ExtensionServiceTest
loaded_.erase(i);
break;
}
- case chrome::NOTIFICATION_EXTENSION_INSTALLED: {
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED: {
const extensions::InstalledExtensionInfo* installed_info =
content::Details<const extensions::InstalledExtensionInfo>(details)
.ptr();
@@ -6932,7 +6933,7 @@ TEST_F(ExtensionServiceTest, InstallBlacklistedExtension) {
// Extension was installed but not loaded.
EXPECT_TRUE(notifications.CheckNotifications(
- chrome::NOTIFICATION_EXTENSION_INSTALLED));
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED));
EXPECT_TRUE(service_->GetInstalledExtension(id));
EXPECT_FALSE(registry_->enabled_extensions().Contains(id));
diff --git a/chrome/browser/extensions/extension_test_notification_observer.cc b/chrome/browser/extensions/extension_test_notification_observer.cc
index 9844642..c4e3631 100644
--- a/chrome/browser/extensions/extension_test_notification_observer.cc
+++ b/chrome/browser/extensions/extension_test_notification_observer.cc
@@ -185,7 +185,7 @@ bool ExtensionTestNotificationObserver::WaitForExtensionViewsToLoad() {
bool ExtensionTestNotificationObserver::WaitForExtensionInstall() {
int before = extension_installs_observed_;
- WaitForNotification(chrome::NOTIFICATION_EXTENSION_INSTALLED);
+ WaitForNotification(chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED);
return extension_installs_observed_ == (before + 1);
}
@@ -272,7 +272,7 @@ void ExtensionTestNotificationObserver::Observe(
++crx_installers_done_observed_;
break;
- case chrome::NOTIFICATION_EXTENSION_INSTALLED:
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED:
VLOG(1) << "Got EXTENSION_INSTALLED notification.";
++extension_installs_observed_;
break;
diff --git a/chrome/browser/extensions/state_store.cc b/chrome/browser/extensions/state_store.cc
index c4fb85d..fa1fd25 100644
--- a/chrome/browser/extensions/state_store.cc
+++ b/chrome/browser/extensions/state_store.cc
@@ -67,7 +67,8 @@ StateStore::StateStore(Profile* profile,
const base::FilePath& db_path,
bool deferred_load)
: db_path_(db_path), task_queue_(new DelayedTaskQueue()) {
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ registrar_.Add(this,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
content::Source<Profile>(profile));
@@ -87,7 +88,8 @@ StateStore::StateStore(Profile* profile,
StateStore::StateStore(Profile* profile, scoped_ptr<ValueStore> value_store)
: store_(value_store.Pass()), task_queue_(new DelayedTaskQueue()) {
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ registrar_.Add(this,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::Source<Profile>(profile));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
content::Source<Profile>(profile));
@@ -133,7 +135,7 @@ void StateStore::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
switch (type) {
- case chrome::NOTIFICATION_EXTENSION_INSTALLED:
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED:
RemoveKeysForExtension(
content::Details<const InstalledExtensionInfo>(details)->extension->
id());
diff --git a/chrome/browser/extensions/updater/extension_updater.cc b/chrome/browser/extensions/updater/extension_updater.cc
index 14d9934..c45c04d 100644
--- a/chrome/browser/extensions/updater/extension_updater.cc
+++ b/chrome/browser/extensions/updater/extension_updater.cc
@@ -151,7 +151,8 @@ ExtensionUpdater::ExtensionUpdater(ExtensionServiceInterface* service,
#endif
frequency_seconds_ = std::min(frequency_seconds_, kMaxUpdateFrequencySeconds);
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ registrar_.Add(this,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::NotificationService::AllBrowserContextsAndSources());
}
@@ -616,7 +617,7 @@ void ExtensionUpdater::Observe(int type,
MaybeInstallCRXFile();
break;
}
- case chrome::NOTIFICATION_EXTENSION_INSTALLED: {
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED: {
const Extension* extension =
content::Details<const InstalledExtensionInfo>(details)->extension;
if (extension)
diff --git a/chrome/browser/extensions/webstore_startup_installer_browsertest.cc b/chrome/browser/extensions/webstore_startup_installer_browsertest.cc
index 3a25c26..eb2cb8f 100644
--- a/chrome/browser/extensions/webstore_startup_installer_browsertest.cc
+++ b/chrome/browser/extensions/webstore_startup_installer_browsertest.cc
@@ -243,7 +243,8 @@ class CommandLineWebstoreInstall : public WebstoreStartupInstallerTest,
virtual void SetUpOnMainThread() OVERRIDE {
WebstoreStartupInstallerTest::SetUpOnMainThread();
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ registrar_.Add(this,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_OPENED,
content::NotificationService::AllSources());
@@ -257,7 +258,7 @@ class CommandLineWebstoreInstall : public WebstoreStartupInstallerTest,
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE {
- if (type == chrome::NOTIFICATION_EXTENSION_INSTALLED) {
+ if (type == chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED) {
const Extension* extension =
content::Details<const extensions::InstalledExtensionInfo>(details)->
extension;
diff --git a/chrome/browser/performance_monitor/performance_monitor.cc b/chrome/browser/performance_monitor/performance_monitor.cc
index 889339c..359cabc 100644
--- a/chrome/browser/performance_monitor/performance_monitor.cc
+++ b/chrome/browser/performance_monitor/performance_monitor.cc
@@ -229,8 +229,9 @@ void PerformanceMonitor::RegisterForNotifications() {
DCHECK(database_logging_enabled_);
// Extensions
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
- content::NotificationService::AllSources());
+ registrar_.Add(this,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
+ content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_ENABLED,
content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
@@ -554,7 +555,7 @@ void PerformanceMonitor::Observe(int type,
DCHECK(database_logging_enabled_);
switch (type) {
- case chrome::NOTIFICATION_EXTENSION_INSTALLED: {
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED: {
AddExtensionEvent(
EVENT_EXTENSION_INSTALL,
content::Details<const extensions::InstalledExtensionInfo>(details)->
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index 8bea775..36d5954 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -1552,7 +1552,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ExtensionInstallForcelist) {
policies.Set(key::kExtensionInstallForcelist, POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER, forcelist.DeepCopy(), NULL);
content::WindowedNotificationObserver observer(
- chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::NotificationService::AllSources());
UpdateProviderPolicy(policies);
observer.Wait();
@@ -1590,7 +1590,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, ExtensionInstallForcelist) {
extensions::ExtensionUpdater::CheckParams params;
params.install_immediately = true;
content::WindowedNotificationObserver update_observer(
- chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::NotificationService::AllSources());
updater->CheckNow(params);
update_observer.Wait();
@@ -1720,7 +1720,7 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, MAYBE_ExtensionInstallSources) {
UpdateProviderPolicy(policies);
content::WindowedNotificationObserver observer(
- chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::NotificationService::AllSources());
PerformClick(1, 0);
observer.Wait();
diff --git a/chrome/browser/search/hotword_service.cc b/chrome/browser/search/hotword_service.cc
index 6936671..df15d70 100644
--- a/chrome/browser/search/hotword_service.cc
+++ b/chrome/browser/search/hotword_service.cc
@@ -162,7 +162,7 @@ HotwordService::HotwordService(Profile* profile)
base::Unretained(this)));
registrar_.Add(this,
- chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::Source<Profile>(profile_));
// Clear the old user pref because it became unusable.
@@ -179,7 +179,7 @@ HotwordService::~HotwordService() {
void HotwordService::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {
- if (type == chrome::NOTIFICATION_EXTENSION_INSTALLED) {
+ if (type == chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED) {
const extensions::Extension* extension =
content::Details<const extensions::InstalledExtensionInfo>(details)
->extension;
@@ -194,7 +194,7 @@ void HotwordService::Observe(int type,
// user opts in at which point the pref registrar will take over
// enabling and disabling.
registrar_.Remove(this,
- chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::Source<Profile>(profile_));
}
}
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 96658ba..3b21de1 100644
--- a/chrome/browser/sync_file_system/sync_file_system_service.cc
+++ b/chrome/browser/sync_file_system/sync_file_system_service.cc
@@ -407,7 +407,8 @@ void SyncFileSystemService::Initialize(
profile_sync_service->AddObserver(this);
}
- registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ registrar_.Add(this,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::Source<Profile>(profile_));
registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED,
content::Source<Profile>(profile_));
@@ -623,7 +624,7 @@ void SyncFileSystemService::Observe(
// Reload, Restart: UNLOADED(DISABLE) -> INSTALLED -> ENABLED.
//
switch (type) {
- case chrome::NOTIFICATION_EXTENSION_INSTALLED:
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED:
HandleExtensionInstalled(details);
break;
case chrome::NOTIFICATION_EXTENSION_UNLOADED_DEPRECATED:
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc
index 3cf1a04..3b22ccb 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -247,8 +247,7 @@ void ThemeService::Observe(int type,
content::Source<Profile>(profile_));
OnExtensionServiceReady();
break;
- case chrome::NOTIFICATION_EXTENSION_INSTALLED:
- {
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED: {
// The theme may be initially disabled. Wait till it is loaded (if ever).
Details<const extensions::InstalledExtensionInfo> installed_details(
details);
@@ -501,7 +500,7 @@ void ThemeService::OnExtensionServiceReady() {
}
registrar_.Add(this,
- chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::Source<Profile>(profile_));
registrar_.Add(this,
chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
diff --git a/extensions/browser/api/runtime/runtime_api.cc b/extensions/browser/api/runtime/runtime_api.cc
index d0323d0..6efd6fb 100644
--- a/extensions/browser/api/runtime/runtime_api.cc
+++ b/extensions/browser/api/runtime/runtime_api.cc
@@ -144,7 +144,7 @@ RuntimeAPI::RuntimeAPI(content::BrowserContext* context)
chrome::NOTIFICATION_EXTENSION_LOADED_DEPRECATED,
content::Source<BrowserContext>(context));
registrar_.Add(this,
- chrome::NOTIFICATION_EXTENSION_INSTALLED,
+ chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED,
content::Source<BrowserContext>(context));
registrar_.Add(this,
chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
@@ -177,7 +177,7 @@ void RuntimeAPI::Observe(int type,
OnExtensionLoaded(extension);
break;
}
- case chrome::NOTIFICATION_EXTENSION_INSTALLED: {
+ case chrome::NOTIFICATION_EXTENSION_INSTALLED_DEPRECATED: {
const Extension* extension =
content::Details<const InstalledExtensionInfo>(details)->extension;
OnExtensionInstalled(extension);