Chromium Code Reviews| Index: chrome/browser/extensions/extension_service.cc |
| diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc |
| index 98447f8d6b536ce96c711a765cee66925ec59d00..93fe768bd254cf7ec5456115a0d6145e1e5636d2 100644 |
| --- a/chrome/browser/extensions/extension_service.cc |
| +++ b/chrome/browser/extensions/extension_service.cc |
| @@ -35,7 +35,6 @@ |
| #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" |
| #include "chrome/browser/extensions/api/runtime/runtime_api.h" |
| #include "chrome/browser/extensions/api/storage/settings_frontend.h" |
| -#include "chrome/browser/extensions/app_notification_manager.h" |
| #include "chrome/browser/extensions/app_sync_data.h" |
| #include "chrome/browser/extensions/browser_event_router.h" |
| #include "chrome/browser/extensions/component_loader.h" |
| @@ -348,8 +347,6 @@ ExtensionService::ExtensionService(Profile* profile, |
| ready_(false), |
| toolbar_model_(ALLOW_THIS_IN_INITIALIZER_LIST(this)), |
| menu_manager_(profile), |
| - app_notification_manager_( |
| - new extensions::AppNotificationManager(profile)), |
| event_routers_initialized_(false), |
| update_once_all_providers_are_ready_(false), |
| browser_terminating_(false), |
| @@ -407,8 +404,6 @@ ExtensionService::ExtensionService(Profile* profile, |
| profile->GetPrefs(), |
| g_browser_process->local_state())); |
| - app_notification_manager_->Init(); |
| - |
| if (extensions_enabled_) { |
| CHECK(!ProfileManager::IsImportProcess(*command_line)); |
| extensions::ExternalProviderImpl::CreateExternalProviders( |
| @@ -1391,8 +1386,6 @@ extensions::AppSyncData ExtensionService::GetAppSyncData( |
| extension, |
| IsExtensionEnabled(extension.id()), |
| IsIncognitoEnabled(extension.id()), |
| - extension_prefs_->GetAppNotificationClientId(extension.id()), |
| - extension_prefs_->IsAppNotificationDisabled(extension.id()), |
| extension_prefs_->extension_sorting()->GetAppLaunchOrdinal( |
| extension.id()), |
| extension_prefs_->extension_sorting()->GetPageOrdinal(extension.id())); |
| @@ -1451,8 +1444,6 @@ bool ExtensionService::ProcessExtensionSyncData( |
| bool ExtensionService::ProcessAppSyncData( |
| const extensions::AppSyncData& app_sync_data) { |
| const std::string& id = app_sync_data.id(); |
| - const Extension* extension = GetInstalledExtension(id); |
| - bool extension_installed = (extension != NULL); |
| if (app_sync_data.app_launch_ordinal().IsValid() && |
| app_sync_data.page_ordinal().IsValid()) { |
| @@ -1464,14 +1455,6 @@ bool ExtensionService::ProcessAppSyncData( |
| app_sync_data.page_ordinal()); |
| } |
| - if (extension_installed) { |
| - if (app_sync_data.notifications_disabled() != |
| - extension_prefs_->IsAppNotificationDisabled(id)) { |
| - extension_prefs_->SetAppNotificationDisabled( |
| - id, app_sync_data.notifications_disabled()); |
| - } |
| - } |
| - |
| if (!ProcessExtensionSyncDataHelper(app_sync_data.extension_sync_data(), |
| syncer::APPS)) { |
| app_sync_bundle_.AddPendingApp(id, app_sync_data); |
| @@ -1632,38 +1615,6 @@ void ExtensionService::SetIsIncognitoEnabled( |
| SyncExtensionChangeIfNeeded(*extension); |
| } |
| -void ExtensionService::SetAppNotificationSetupDone( |
| - const std::string& extension_id, |
| - const std::string& oauth_client_id) { |
| - const Extension* extension = GetInstalledExtension(extension_id); |
| - // This method is called when the user sets up app notifications. |
| - // So it is not expected to be called until the extension is installed. |
| - if (!extension) { |
| - NOTREACHED(); |
| - return; |
| - } |
| - extension_prefs_->SetAppNotificationClientId(extension_id, oauth_client_id); |
| - SyncExtensionChangeIfNeeded(*extension); |
| -} |
| - |
| -void ExtensionService::SetAppNotificationDisabled( |
| - const std::string& extension_id, |
| - bool value) { |
| - const Extension* extension = GetInstalledExtension(extension_id); |
| - // This method is called when the user enables/disables app notifications. |
| - // So it is not expected to be called until the extension is installed. |
| - if (!extension) { |
| - NOTREACHED(); |
| - return; |
| - } |
| - if (value) |
| - UMA_HISTOGRAM_COUNTS("Apps.SetAppNotificationsDisabled", 1); |
| - else |
| - UMA_HISTOGRAM_COUNTS("Apps.SetAppNotificationsEnabled", 1); |
|
not at google - send to devlin
2013/03/08 23:44:10
need to remember to remove this UMA.
|
| - extension_prefs_->SetAppNotificationDisabled(extension_id, value); |
| - SyncExtensionChangeIfNeeded(*extension); |
| -} |
| - |
| bool ExtensionService::CanCrossIncognito(const Extension* extension) const { |
| // We allow the extension to see events and data from another profile iff it |
| // uses "spanning" behavior and it has incognito access. "split" mode |