| Index: chrome/test/testing_profile.cc
|
| diff --git a/chrome/test/testing_profile.cc b/chrome/test/testing_profile.cc
|
| index 468c051b71104730c861ed6668de158f1c83e131..cab23da9f53d779854510a576988a1c9bc4c7bc8 100644
|
| --- a/chrome/test/testing_profile.cc
|
| +++ b/chrome/test/testing_profile.cc
|
| @@ -27,6 +27,7 @@
|
| #include "chrome/browser/net/gaia/token_service.h"
|
| #include "chrome/browser/net/pref_proxy_config_service.h"
|
| #include "chrome/browser/notifications/desktop_notification_service.h"
|
| +#include "chrome/browser/notifications/desktop_notification_service_factory.h"
|
| #include "chrome/browser/prefs/browser_prefs.h"
|
| #include "chrome/browser/prefs/testing_pref_store.h"
|
| #include "chrome/browser/prerender/prerender_manager.h"
|
| @@ -141,6 +142,10 @@ class TestExtensionURLRequestContextGetter
|
| scoped_refptr<net::URLRequestContext> context_;
|
| };
|
|
|
| +ProfileKeyedService* CreateTestDesktopNotificationService(Profile* profile) {
|
| + return new DesktopNotificationService(profile, NULL);
|
| +}
|
| +
|
| } // namespace
|
|
|
| TestingProfile::TestingProfile()
|
| @@ -172,6 +177,12 @@ TestingProfile::TestingProfile()
|
| CHECK(temp_dir_.Set(system_tmp_dir));
|
| }
|
| }
|
| +
|
| + // Install profile keyed service factory hooks for dummy/test services
|
| + DesktopNotificationServiceFactory::GetInstance()->set_test_factory(
|
| + &CreateTestDesktopNotificationService);
|
| + DesktopNotificationServiceFactory::GetInstance()->ForceAssociationBetween(
|
| + this, NULL);
|
| }
|
|
|
| TestingProfile::~TestingProfile() {
|
| @@ -362,11 +373,6 @@ TestingPrefService* TestingProfile::GetTestingPrefService() {
|
| return testing_prefs_;
|
| }
|
|
|
| -void TestingProfile::SetProfileDependencyManager(
|
| - ProfileDependencyManager* manager) {
|
| - profile_dependency_manager_ = manager;
|
| -}
|
| -
|
| ProfileId TestingProfile::GetRuntimeId() {
|
| return reinterpret_cast<ProfileId>(this);
|
| }
|
| @@ -693,15 +699,6 @@ NTPResourceCache* TestingProfile::GetNTPResourceCache() {
|
| return ntp_resource_cache_.get();
|
| }
|
|
|
| -DesktopNotificationService* TestingProfile::GetDesktopNotificationService() {
|
| - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| - if (!desktop_notification_service_.get()) {
|
| - desktop_notification_service_.reset(new DesktopNotificationService(
|
| - this, NULL));
|
| - }
|
| - return desktop_notification_service_.get();
|
| -}
|
| -
|
| BackgroundContentsService*
|
| TestingProfile::GetBackgroundContentsService() const {
|
| return NULL;
|
|
|