Index: chrome/browser/local_discovery/privet_notifications_factory.cc |
diff --git a/chrome/browser/local_discovery/privet_notifications_factory.cc b/chrome/browser/local_discovery/privet_notifications_factory.cc |
index 305b37dfde982c86aba94977cb22cd25d76e263c..f37edcdac5e8d15e8cedd83a2a75b0823ba26134 100644 |
--- a/chrome/browser/local_discovery/privet_notifications_factory.cc |
+++ b/chrome/browser/local_discovery/privet_notifications_factory.cc |
@@ -29,16 +29,16 @@ PrivetNotificationServiceFactory::~PrivetNotificationServiceFactory() { |
BrowserContextKeyedService* |
PrivetNotificationServiceFactory::BuildServiceInstanceFor( |
content::BrowserContext* profile) const { |
- return new PrivetNotificationService( |
- profile, g_browser_process->notification_ui_manager()); |
+ return new PrivetNotificationService(profile); |
} |
bool |
PrivetNotificationServiceFactory::ServiceIsCreatedWithBrowserContext() const { |
- // TODO(vitalybuka): re-enable after fixing broken tests. |
- return false; |
- return !CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kDisableDeviceDiscovery); |
+ CommandLine* command_line = CommandLine::ForCurrentProcess(); |
+ using switches::kDisableDeviceDiscovery; |
+ using switches::kDisableDeviceDiscoveryNotifications; |
+ return !command_line->HasSwitch(kDisableDeviceDiscovery) && |
+ !command_line->HasSwitch(kDisableDeviceDiscoveryNotifications); |
} |
bool PrivetNotificationServiceFactory::ServiceIsNULLWhileTesting() const { |