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