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

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

Issue 231723006: Remove balloon notification code. The last user was the Linux GTK port but that's deleted now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync after elliot's r263101 Created 6 years, 8 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 } 214 }
215 215
216 void PrivetNotificationService::DeviceCacheFlushed() { 216 void PrivetNotificationService::DeviceCacheFlushed() {
217 privet_notifications_listener_->DeviceCacheFlushed(); 217 privet_notifications_listener_->DeviceCacheFlushed();
218 } 218 }
219 219
220 // static 220 // static
221 bool PrivetNotificationService::IsEnabled() { 221 bool PrivetNotificationService::IsEnabled() {
222 CommandLine* command_line = CommandLine::ForCurrentProcess(); 222 CommandLine* command_line = CommandLine::ForCurrentProcess();
223 return !command_line->HasSwitch(switches::kDisableDeviceDiscovery) && 223 return !command_line->HasSwitch(switches::kDisableDeviceDiscovery) &&
224 !command_line->HasSwitch( 224 !command_line->HasSwitch(switches::kDisableDeviceDiscoveryNotifications);
225 switches::kDisableDeviceDiscoveryNotifications) &&
226 message_center::IsRichNotificationEnabled();
227 } 225 }
228 226
229 // static 227 // static
230 bool PrivetNotificationService::IsForced() { 228 bool PrivetNotificationService::IsForced() {
231 CommandLine* command_line = CommandLine::ForCurrentProcess(); 229 CommandLine* command_line = CommandLine::ForCurrentProcess();
232 return command_line->HasSwitch(switches::kEnableDeviceDiscoveryNotifications); 230 return command_line->HasSwitch(switches::kEnableDeviceDiscoveryNotifications);
233 } 231 }
234 232
235 void PrivetNotificationService::PrivetNotify(bool has_multiple, 233 void PrivetNotificationService::PrivetNotify(bool has_multiple,
236 bool added) { 234 bool added) {
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 402
405 void PrivetNotificationDelegate::DisableNotifications() { 403 void PrivetNotificationDelegate::DisableNotifications() {
406 Profile* profile_obj = Profile::FromBrowserContext(profile_); 404 Profile* profile_obj = Profile::FromBrowserContext(profile_);
407 405
408 profile_obj->GetPrefs()->SetBoolean( 406 profile_obj->GetPrefs()->SetBoolean(
409 prefs::kLocalDiscoveryNotificationsEnabled, 407 prefs::kLocalDiscoveryNotificationsEnabled,
410 false); 408 false);
411 } 409 }
412 410
413 } // namespace local_discovery 411 } // namespace local_discovery
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_crash_recovery_browsertest.cc ('k') | chrome/browser/notifications/balloon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698