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.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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 : profile_(profile) { | 363 : profile_(profile) { |
364 } | 364 } |
365 | 365 |
366 PrivetNotificationDelegate::~PrivetNotificationDelegate() { | 366 PrivetNotificationDelegate::~PrivetNotificationDelegate() { |
367 } | 367 } |
368 | 368 |
369 std::string PrivetNotificationDelegate::id() const { | 369 std::string PrivetNotificationDelegate::id() const { |
370 return kPrivetNotificationID; | 370 return kPrivetNotificationID; |
371 } | 371 } |
372 | 372 |
373 content::WebContents* PrivetNotificationDelegate::GetWebContents() const { | |
374 return NULL; | |
375 } | |
376 | |
377 void PrivetNotificationDelegate::Display() { | 373 void PrivetNotificationDelegate::Display() { |
378 } | 374 } |
379 | 375 |
380 void PrivetNotificationDelegate::Error() { | 376 void PrivetNotificationDelegate::Error() { |
381 LOG(ERROR) << "Error displaying privet notification"; | 377 LOG(ERROR) << "Error displaying privet notification"; |
382 } | 378 } |
383 | 379 |
384 void PrivetNotificationDelegate::Close(bool by_user) { | 380 void PrivetNotificationDelegate::Close(bool by_user) { |
385 } | 381 } |
386 | 382 |
(...skipping 22 matching lines...) Expand all Loading... |
409 | 405 |
410 void PrivetNotificationDelegate::DisableNotifications() { | 406 void PrivetNotificationDelegate::DisableNotifications() { |
411 Profile* profile_obj = Profile::FromBrowserContext(profile_); | 407 Profile* profile_obj = Profile::FromBrowserContext(profile_); |
412 | 408 |
413 profile_obj->GetPrefs()->SetBoolean( | 409 profile_obj->GetPrefs()->SetBoolean( |
414 prefs::kLocalDiscoveryNotificationsEnabled, | 410 prefs::kLocalDiscoveryNotificationsEnabled, |
415 false); | 411 false); |
416 } | 412 } |
417 | 413 |
418 } // namespace local_discovery | 414 } // namespace local_discovery |
OLD | NEW |