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

Unified Diff: content/shell/browser/layout_test/layout_test_notification_manager.cc

Issue 622793002: Group the different permission related methods in the content api. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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: content/shell/browser/layout_test/layout_test_notification_manager.cc
diff --git a/content/shell/browser/layout_test/layout_test_notification_manager.cc b/content/shell/browser/layout_test/layout_test_notification_manager.cc
index b3f64b471bd1760a91999686d5a6022d4b902a0a..7366aabcd8f242d08132b18e17f63463a4bd0783 100644
--- a/content/shell/browser/layout_test/layout_test_notification_manager.cc
+++ b/content/shell/browser/layout_test/layout_test_notification_manager.cc
@@ -29,9 +29,10 @@ LayoutTestNotificationManager::CheckPermission(const GURL& origin) {
void LayoutTestNotificationManager::RequestPermission(
const GURL& origin,
- const base::Callback<void(blink::WebNotificationPermission)>& callback) {
- DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
- callback.Run(CheckPermission(origin));
+ const base::Callback<void(bool)>& callback) {
+ bool allowed =
+ CheckPermission(origin) == blink::WebNotificationPermissionAllowed;
+ callback.Run(allowed);
}
void LayoutTestNotificationManager::SetPermission(

Powered by Google App Engine
This is Rietveld 408576698