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

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

Issue 460183002: Removed --disable-device-discovery switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Mon 08/11/2014 18:23:33.89 Created 6 years, 4 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.h" 5 #include "chrome/browser/local_discovery/privet_notifications.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 privet_notifications_listener_->DeviceRemoved(name); 218 privet_notifications_listener_->DeviceRemoved(name);
219 } 219 }
220 220
221 void PrivetNotificationService::DeviceCacheFlushed() { 221 void PrivetNotificationService::DeviceCacheFlushed() {
222 privet_notifications_listener_->DeviceCacheFlushed(); 222 privet_notifications_listener_->DeviceCacheFlushed();
223 } 223 }
224 224
225 // static 225 // static
226 bool PrivetNotificationService::IsEnabled() { 226 bool PrivetNotificationService::IsEnabled() {
227 CommandLine* command_line = CommandLine::ForCurrentProcess(); 227 CommandLine* command_line = CommandLine::ForCurrentProcess();
228 return !command_line->HasSwitch(switches::kDisableDeviceDiscovery) && 228 return !command_line->HasSwitch(
229 !command_line->HasSwitch(switches::kDisableDeviceDiscoveryNotifications); 229 switches::kDisableDeviceDiscoveryNotifications);
230 } 230 }
231 231
232 // static 232 // static
233 bool PrivetNotificationService::IsForced() { 233 bool PrivetNotificationService::IsForced() {
234 CommandLine* command_line = CommandLine::ForCurrentProcess(); 234 CommandLine* command_line = CommandLine::ForCurrentProcess();
235 return command_line->HasSwitch(switches::kEnableDeviceDiscoveryNotifications); 235 return command_line->HasSwitch(switches::kEnableDeviceDiscoveryNotifications);
236 } 236 }
237 237
238 void PrivetNotificationService::PrivetNotify(bool has_multiple, 238 void PrivetNotificationService::PrivetNotify(bool has_multiple,
239 bool added) { 239 bool added) {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 407
408 void PrivetNotificationDelegate::DisableNotifications() { 408 void PrivetNotificationDelegate::DisableNotifications() {
409 Profile* profile_obj = Profile::FromBrowserContext(profile_); 409 Profile* profile_obj = Profile::FromBrowserContext(profile_);
410 410
411 profile_obj->GetPrefs()->SetBoolean( 411 profile_obj->GetPrefs()->SetBoolean(
412 prefs::kLocalDiscoveryNotificationsEnabled, 412 prefs::kLocalDiscoveryNotificationsEnabled,
413 false); 413 false);
414 } 414 }
415 415
416 } // namespace local_discovery 416 } // namespace local_discovery
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698