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

Unified Diff: chrome/browser/notifications/desktop_notification_service.h

Issue 661643002: Adds a context message of the security origin for web notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addresses peter's comments. Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/notifications/desktop_notification_service.h
diff --git a/chrome/browser/notifications/desktop_notification_service.h b/chrome/browser/notifications/desktop_notification_service.h
index 8ffd480070fdf4d0db4166e1e1b81dd1621414d4..5f9473b1d25f5b68136353a891656c4cf53ff75a 100644
--- a/chrome/browser/notifications/desktop_notification_service.h
+++ b/chrome/browser/notifications/desktop_notification_service.h
@@ -97,18 +97,29 @@ class DesktopNotificationService : public PermissionContextBase
// Returns true if the notifier with |notifier_id| is allowed to send
// notifications.
- bool IsNotifierEnabled(const message_center::NotifierId& notifier_id);
+ bool IsNotifierEnabled(const message_center::NotifierId& notifier_id) const;
// Updates the availability of the notifier.
void SetNotifierEnabled(const message_center::NotifierId& notifier_id,
bool enabled);
private:
+ FRIEND_TEST_ALL_PREFIXES(DesktopNotificationServiceTest,
+ TestOriginDisplayName);
// Returns a display name for an origin in the process id, to be used in
// permission infobar or on the frame of the notification toast. Different
// from the origin itself when dealing with extensions.
base::string16 DisplayNameForOriginInProcessId(const GURL& origin,
- int process_id);
+ int process_id) const;
+
+#if defined(ENABLE_EXTENSIONS)
+ bool ExtensionDisplayName(const GURL& origin,
+ int process_id,
+ base::string16* out) const;
+#endif
+
+ static base::string16 OriginDisplayName(const GURL& origin,
+ std::string languages);
Peter Beverloo 2014/10/29 16:25:19 Sorry, I meant the |languages| argument, that can
dewittj 2014/11/03 17:18:32 Done.
// Called when the string list pref has been changed.
void OnStringListPrefChanged(

Powered by Google App Engine
This is Rietveld 408576698