diff options
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r-- | chrome/browser/ui/cocoa/notifications/balloon_controller.mm | 3 | ||||
-rw-r--r-- | chrome/browser/ui/options/options_util.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/webui/options/content_settings_handler.cc | 17 |
3 files changed, 10 insertions, 14 deletions
diff --git a/chrome/browser/ui/cocoa/notifications/balloon_controller.mm b/chrome/browser/ui/cocoa/notifications/balloon_controller.mm index dec0b90..094ec95 100644 --- a/chrome/browser/ui/cocoa/notifications/balloon_controller.mm +++ b/chrome/browser/ui/cocoa/notifications/balloon_controller.mm @@ -11,7 +11,6 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/notifications/balloon.h" #include "chrome/browser/notifications/desktop_notification_service.h" -#include "chrome/browser/notifications/desktop_notification_service_factory.h" #include "chrome/browser/notifications/notification.h" #include "chrome/browser/notifications/notification_options_menu_model.h" #include "chrome/browser/profiles/profile.h" @@ -145,7 +144,7 @@ const int kRightMargin = 2; - (IBAction)permissionRevoked:(id)sender { DesktopNotificationService* service = - DesktopNotificationServiceFactory::GetForProfile(balloon_->profile()); + balloon_->profile()->GetDesktopNotificationService(); service->DenyPermission(balloon_->notification().origin_url()); } diff --git a/chrome/browser/ui/options/options_util.cc b/chrome/browser/ui/options/options_util.cc index 43cd7dd..590c093 100644 --- a/chrome/browser/ui/options/options_util.cc +++ b/chrome/browser/ui/options/options_util.cc @@ -12,7 +12,6 @@ #include "chrome/browser/geolocation/geolocation_content_settings_map.h" #include "chrome/browser/metrics/metrics_service.h" #include "chrome/browser/notifications/desktop_notification_service.h" -#include "chrome/browser/notifications/desktop_notification_service_factory.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/pref_names.h" @@ -84,8 +83,7 @@ void OptionsUtil::ResetToDefaults(Profile* profile) { profile->GetHostContentSettingsMap()->ResetToDefaults(); profile->GetGeolocationContentSettingsMap()->ResetToDefault(); profile->GetHostZoomMap()->ResetToDefaults(); - DesktopNotificationServiceFactory::GetForProfile(profile)-> - ResetToDefaultContentSetting(); + profile->GetDesktopNotificationService()->ResetToDefaultContentSetting(); for (size_t i = 0; i < arraysize(kUserPrefs); ++i) prefs->ClearPref(kUserPrefs[i]); diff --git a/chrome/browser/ui/webui/options/content_settings_handler.cc b/chrome/browser/ui/webui/options/content_settings_handler.cc index 6bbab55..3c631d2 100644 --- a/chrome/browser/ui/webui/options/content_settings_handler.cc +++ b/chrome/browser/ui/webui/options/content_settings_handler.cc @@ -13,7 +13,6 @@ #include "chrome/browser/content_settings/host_content_settings_map.h" #include "chrome/browser/geolocation/geolocation_content_settings_map.h" #include "chrome/browser/notifications/desktop_notification_service.h" -#include "chrome/browser/notifications/desktop_notification_service_factory.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/common/chrome_switches.h" @@ -376,8 +375,8 @@ std::string ContentSettingsHandler::GetSettingDefaultFromModel( default_setting = web_ui_->GetProfile()-> GetGeolocationContentSettingsMap()->GetDefaultContentSetting(); } else if (type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) { - default_setting = DesktopNotificationServiceFactory::GetForProfile( - web_ui_->GetProfile())->GetDefaultContentSetting(); + default_setting = web_ui_->GetProfile()-> + GetDesktopNotificationService()->GetDefaultContentSetting(); } else { default_setting = GetContentSettingsMap()->GetDefaultContentSetting(type); } @@ -391,8 +390,8 @@ bool ContentSettingsHandler::GetDefaultSettingManagedFromModel( return web_ui_->GetProfile()-> GetGeolocationContentSettingsMap()->IsDefaultContentSettingManaged(); } else if (type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) { - return DesktopNotificationServiceFactory::GetForProfile( - web_ui_->GetProfile())->IsDefaultContentSettingManaged(); + return web_ui_->GetProfile()-> + GetDesktopNotificationService()->IsDefaultContentSettingManaged(); } else { return GetContentSettingsMap()->IsDefaultContentSettingManaged(type); } @@ -492,7 +491,7 @@ void ContentSettingsHandler::UpdateGeolocationExceptionsView() { void ContentSettingsHandler::UpdateNotificationExceptionsView() { DesktopNotificationService* service = - DesktopNotificationServiceFactory::GetForProfile(web_ui_->GetProfile()); + web_ui_->GetProfile()->GetDesktopNotificationService(); std::vector<GURL> allowed(service->GetAllowedOrigins()); std::vector<GURL> blocked(service->GetBlockedOrigins()); @@ -591,7 +590,7 @@ void ContentSettingsHandler::SetContentFilter(const ListValue* args) { web_ui_->GetProfile()->GetGeolocationContentSettingsMap()-> SetDefaultContentSetting(default_setting); } else if (content_type == CONTENT_SETTINGS_TYPE_NOTIFICATIONS) { - DesktopNotificationServiceFactory::GetForProfile(web_ui_->GetProfile())-> + web_ui_->GetProfile()->GetDesktopNotificationService()-> SetDefaultContentSetting(default_setting); } else { GetContentSettingsMap()-> @@ -633,11 +632,11 @@ void ContentSettingsHandler::RemoveException(const ListValue* args) { DCHECK(rv); ContentSetting content_setting = ContentSettingFromString(setting); if (content_setting == CONTENT_SETTING_ALLOW) { - DesktopNotificationServiceFactory::GetForProfile(web_ui_->GetProfile())-> + web_ui_->GetProfile()->GetDesktopNotificationService()-> ResetAllowedOrigin(GURL(origin)); } else { DCHECK_EQ(content_setting, CONTENT_SETTING_BLOCK); - DesktopNotificationServiceFactory::GetForProfile(web_ui_->GetProfile())-> + web_ui_->GetProfile()->GetDesktopNotificationService()-> ResetBlockedOrigin(GURL(origin)); } } else { |