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

Side by Side Diff: chrome/browser/notifications/platform_notification_service_impl.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: Fix merge error. Created 5 years, 11 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
6 #define CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 // used by tests. Tests are responsible for cleaning up after themselves. 90 // used by tests. Tests are responsible for cleaning up after themselves.
91 void SetNotificationUIManagerForTesting(NotificationUIManager* manager); 91 void SetNotificationUIManagerForTesting(NotificationUIManager* manager);
92 92
93 // Returns a display name for an origin in the process id, to be used in 93 // Returns a display name for an origin in the process id, to be used in
94 // permission infobar or on the frame of the notification toast. Different 94 // permission infobar or on the frame of the notification toast. Different
95 // from the origin itself when dealing with extensions. 95 // from the origin itself when dealing with extensions.
96 base::string16 DisplayNameForOriginInProcessId(Profile* profile, 96 base::string16 DisplayNameForOriginInProcessId(Profile* profile,
97 const GURL& origin, 97 const GURL& origin,
98 int process_id) const; 98 int process_id) const;
99 99
100 #if defined(ENABLE_EXTENSIONS)
101 bool ExtensionDisplayName(Profile* profile,
102 const GURL& origin,
103 int process_id,
104 base::string16* out) const;
105 #endif
106
107 static base::string16 OriginDisplayName(const GURL& origin,
Peter Beverloo 2015/01/10 00:03:33 Muh. I feel like this shouldn't be something in ou
dewittj 2015/01/13 22:18:01 right, that's the reason this patch has been in li
Peter Beverloo 2015/01/14 19:18:14 Agreed.
108 const std::string& languages);
109
100 // Weak reference. Ownership maintains with the test. 110 // Weak reference. Ownership maintains with the test.
101 NotificationUIManager* notification_ui_manager_for_tests_; 111 NotificationUIManager* notification_ui_manager_for_tests_;
102 112
103 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl); 113 DISALLOW_COPY_AND_ASSIGN(PlatformNotificationServiceImpl);
104 }; 114 };
105 115
106 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_ 116 #endif // CHROME_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698