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

Unified Diff: chrome/test/testing_profile.h

Issue 2842043: Add a default content setting to the notifications service. (Closed)
Patch Set: '' Created 10 years, 6 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/test/testing_profile.h
diff --git a/chrome/test/testing_profile.h b/chrome/test/testing_profile.h
index fda2f57c8109581851223f0f8fbb13d58736d4d0..b5958c781de92599a906b1a0c8329101b62d21f5 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));
dhollowa 2010/07/03 02:12:01 nit: two space indent.
Nico 2010/07/03 02:18:29 Done.
+ 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_;
« chrome/browser/notifications/notifications_prefs_cache.h ('K') | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698