OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/local_discovery/privet_notifications_factory.h" | 5 #include "chrome/browser/local_discovery/privet_notifications_factory.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/browser/browser_process.h" | 8 #include "chrome/browser/browser_process.h" |
9 #include "chrome/browser/local_discovery/privet_notifications.h" | 9 #include "chrome/browser/local_discovery/privet_notifications.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 BrowserContextKeyedService* | 29 BrowserContextKeyedService* |
30 PrivetNotificationServiceFactory::BuildServiceInstanceFor( | 30 PrivetNotificationServiceFactory::BuildServiceInstanceFor( |
31 content::BrowserContext* profile) const { | 31 content::BrowserContext* profile) const { |
32 return new PrivetNotificationService( | 32 return new PrivetNotificationService( |
33 profile, g_browser_process->notification_ui_manager()); | 33 profile, g_browser_process->notification_ui_manager()); |
34 } | 34 } |
35 | 35 |
36 bool | 36 bool |
37 PrivetNotificationServiceFactory::ServiceIsCreatedWithBrowserContext() const { | 37 PrivetNotificationServiceFactory::ServiceIsCreatedWithBrowserContext() const { |
38 return CommandLine::ForCurrentProcess()->HasSwitch( | 38 // TODO(vitalybuka): re-enable after fixing broken tests. |
39 switches::kEnableDeviceDiscovery); | 39 return false; |
| 40 return !CommandLine::ForCurrentProcess()->HasSwitch( |
| 41 switches::kDisableDeviceDiscovery); |
| 42 } |
| 43 |
| 44 bool PrivetNotificationServiceFactory::ServiceIsNULLWhileTesting() const { |
| 45 return true; |
40 } | 46 } |
41 | 47 |
42 } // namespace local_discovery | 48 } // namespace local_discovery |
OLD | NEW |