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

Unified Diff: chrome/browser/local_discovery/privet_notifications_factory.cc

Issue 23903024: Enable device discovery notifications. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/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 {
« no previous file with comments | « chrome/browser/local_discovery/privet_notifications.cc ('k') | chrome/browser/task_manager/task_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698