Index: chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc |
diff --git a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc |
index 5e65f5a9220f42240b3df7362ec68a9d77cd9145..95b03e9a0fb614f6ba802e44f558011f23a31aef 100644 |
--- a/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc |
+++ b/chrome/browser/notifications/sync_notifier/chrome_notifier_service_factory.cc |
@@ -7,6 +7,7 @@ |
#include "base/command_line.h" |
#include "chrome/browser/browser_process.h" |
#include "chrome/browser/notifications/sync_notifier/chrome_notifier_service.h" |
+#include "chrome/browser/notifications/sync_notifier/synced_notification_app_info_service_factory.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/chrome_version_info.h" |
#include "components/browser_context_keyed_service/browser_context_dependency_manager.h" |
@@ -45,8 +46,13 @@ bool ChromeNotifierServiceFactory::UseSyncedNotifications( |
ChromeNotifierServiceFactory::ChromeNotifierServiceFactory() |
: BrowserContextKeyedServiceFactory( |
- "ChromeNotifierService", |
- BrowserContextDependencyManager::GetInstance()) {} |
+ "ChromeNotifierService", |
+ BrowserContextDependencyManager::GetInstance()) { |
+ // Mark this service as depending on the SyncedNotificationAppInfoService. |
+ // Marking it provides a guarantee that the other service will alwasys be |
+ // running whenever the ChromeNotifierServiceFactory is. |
+ DependsOn(SyncedNotificationAppInfoServiceFactory::GetInstance()); |
+} |
ChromeNotifierServiceFactory::~ChromeNotifierServiceFactory() { |
} |