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

Side by Side Diff: chrome/browser/local_discovery/privet_notifications_factory.cc

Issue 23567023: Enable Device Discovery by default on Linux, ChromeOS and Windows. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698