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

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

Issue 1292003004: Elide origins displayed on web notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Style nit Created 5 years, 4 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/platform_notification_service_impl.h
diff --git a/chrome/browser/notifications/platform_notification_service_impl.h b/chrome/browser/notifications/platform_notification_service_impl.h
index b8aa58093ca7663c70ddcdf81f0a9ca7db12a82b..f9a4375cdb3d1de88a71e2b62cebbc64f42b32b3 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.h
+++ b/chrome/browser/notifications/platform_notification_service_impl.h
@@ -90,10 +90,10 @@ class PlatformNotificationServiceImpl
friend class PlatformNotificationServiceBrowserTest;
friend class PlatformNotificationServiceTest;
friend class PushMessagingBrowserTest;
- FRIEND_TEST_ALL_PREFIXES(
- PlatformNotificationServiceTest, DisplayNameForOrigin);
FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest,
- TestWebOriginDisplayName);
+ CreateNotificationFromData);
+ FRIEND_TEST_ALL_PREFIXES(PlatformNotificationServiceTest,
+ DisplayNameForContextMessage);
PlatformNotificationServiceImpl();
~PlatformNotificationServiceImpl() override;
@@ -112,18 +112,9 @@ class PlatformNotificationServiceImpl
// used by tests. Tests are responsible for cleaning up after themselves.
void SetNotificationUIManagerForTesting(NotificationUIManager* manager);
- // Returns a display name for an origin, 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 DisplayNameForOrigin(Profile* profile,
- const GURL& origin) const;
-
- // Translates a URL into a slightly more readable version that may omit
- // the port and scheme for common cases.
- // TODO(dewittj): Remove this when the proper function is implemented in a
- // chrome/browser/ui library function. See crbug.com/402698.
- static base::string16 WebOriginDisplayName(const GURL& origin,
- const std::string& languages);
+ // Returns a display name for an origin, to be used in the context message
+ base::string16 DisplayNameForContextMessage(Profile* profile,
+ const GURL& origin) const;
// Weak reference. Ownership maintains with the test.
NotificationUIManager* notification_ui_manager_for_tests_;

Powered by Google App Engine
This is Rietveld 408576698