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

Side by Side Diff: chrome/browser/notifications/desktop_notification_service.cc

Issue 7053041: Add a Create method to DesktopNotificationHandler and stubs for the notification objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 6 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/notifications/desktop_notification_service.h" 5 #include "chrome/browser/notifications/desktop_notification_service.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/content_settings/content_settings_provider.h" 10 #include "chrome/browser/content_settings/content_settings_provider.h"
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 } 584 }
585 return UTF8ToUTF16(origin.host()); 585 return UTF8ToUTF16(origin.host());
586 } 586 }
587 587
588 void DesktopNotificationService::NotifySettingsChange() { 588 void DesktopNotificationService::NotifySettingsChange() {
589 NotificationService::current()->Notify( 589 NotificationService::current()->Notify(
590 NotificationType::DESKTOP_NOTIFICATION_SETTINGS_CHANGED, 590 NotificationType::DESKTOP_NOTIFICATION_SETTINGS_CHANGED,
591 Source<DesktopNotificationService>(this), 591 Source<DesktopNotificationService>(this),
592 NotificationService::NoDetails()); 592 NotificationService::NoDetails());
593 } 593 }
594
595 int DesktopNotificationService::HasPermission(const GURL& origin) {
596 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
597 return prefs_cache()->HasPermission(origin.GetOrigin());
598 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698