Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6148)

Unified Diff: chrome/browser/ui/options/options_util.cc

Issue 6803012: Profile shouldn't own DesktopNotificationService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/options/options_util.cc
diff --git a/chrome/browser/ui/options/options_util.cc b/chrome/browser/ui/options/options_util.cc
index 590c093b0abee913179882bd573294bb9d6bf2f7..43cd7ddbf4f76e7559295a7b7779bcd7a296ef50 100644
--- a/chrome/browser/ui/options/options_util.cc
+++ b/chrome/browser/ui/options/options_util.cc
@@ -12,6 +12,7 @@
#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"
@@ -83,7 +84,8 @@ void OptionsUtil::ResetToDefaults(Profile* profile) {
profile->GetHostContentSettingsMap()->ResetToDefaults();
profile->GetGeolocationContentSettingsMap()->ResetToDefault();
profile->GetHostZoomMap()->ResetToDefaults();
- profile->GetDesktopNotificationService()->ResetToDefaultContentSetting();
+ DesktopNotificationServiceFactory::GetForProfile(profile)->
+ ResetToDefaultContentSetting();
for (size_t i = 0; i < arraysize(kUserPrefs); ++i)
prefs->ClearPref(kUserPrefs[i]);

Powered by Google App Engine
This is Rietveld 408576698