diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-03 02:29:52 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-03 02:29:52 +0000 |
commit | 78dcb900b1ae1209d87cd746c1ff7d4c13f9f04e (patch) | |
tree | 716fc33ee1e0c300f6b56e5921c7b183258458d3 /chrome/test/testing_profile.h | |
parent | 1350815259420160cfd2bdf8d94fbf9f80bc379b (diff) | |
download | chromium_src-78dcb900b1ae1209d87cd746c1ff7d4c13f9f04e.zip chromium_src-78dcb900b1ae1209d87cd746c1ff7d4c13f9f04e.tar.gz chromium_src-78dcb900b1ae1209d87cd746c1ff7d4c13f9f04e.tar.bz2 |
Add a default content setting to the notifications service.
Not yet used anywhere, no behavior change.
BUG=45547
TEST=none (unit tests)
Review URL: http://codereview.chromium.org/2842043
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51587 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/testing_profile.h')
-rw-r--r-- | chrome/test/testing_profile.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/test/testing_profile.h b/chrome/test/testing_profile.h index fda2f57..3a0ca33 100644 --- a/chrome/test/testing_profile.h +++ b/chrome/test/testing_profile.h @@ -20,6 +20,7 @@ #include "chrome/browser/host_content_settings_map.h" #include "chrome/browser/history/history.h" #include "chrome/browser/in_process_webkit/webkit_context.h" +#include "chrome/browser/notifications/desktop_notification_service.h" #include "chrome/browser/pref_service.h" #include "chrome/browser/pref_value_store.h" #include "chrome/browser/profile.h" @@ -264,7 +265,12 @@ class TestingProfile : public Profile { virtual void InitWebResources() {} virtual NTPResourceCache* GetNTPResourceCache(); virtual DesktopNotificationService* GetDesktopNotificationService() { - return NULL; + DCHECK(ChromeThread::CurrentlyOn(ChromeThread::UI)); + if (!desktop_notification_service_.get()) { + desktop_notification_service_.reset(new DesktopNotificationService( + this, NULL)); + } + return desktop_notification_service_.get(); } virtual BackgroundContentsService* GetBackgroundContentsService() { return NULL; @@ -363,6 +369,7 @@ class TestingProfile : public Profile { scoped_refptr<GeolocationContentSettingsMap> geolocation_content_settings_map_; scoped_refptr<GeolocationPermissionContext> geolocation_permission_context_; + scoped_ptr<DesktopNotificationService> desktop_notification_service_; // Find bar state. Created lazily by GetFindBarState(). scoped_ptr<FindBarState> find_bar_state_; |