Skip to content

Instantly share code, notes, and snippets.

@beverloo
Created March 24, 2016 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beverloo/26f16d49084ad66d814a to your computer and use it in GitHub Desktop.
Save beverloo/26f16d49084ad66d814a to your computer and use it in GitHub Desktop.
diff --git a/chrome/browser/push_messaging/push_messaging_permission_context.cc b/chrome/browser/push_messaging/push_messaging_permission_context.cc
index 6125f3e..bd774dd 100644
--- a/chrome/browser/push_messaging/push_messaging_permission_context.cc
+++ b/chrome/browser/push_messaging/push_messaging_permission_context.cc
@@ -53,12 +53,11 @@ ContentSetting PushMessagingPermissionContext::GetPermissionStatus(
push_content_setting == CONTENT_SETTING_BLOCK) {
return CONTENT_SETTING_BLOCK;
}
- if (notifications_permission == CONTENT_SETTING_ASK ||
- push_content_setting == CONTENT_SETTING_ASK) {
+ if (notifications_permission == CONTENT_SETTING_ASK)
return CONTENT_SETTING_ASK;
- }
- DCHECK_EQ(CONTENT_SETTING_ALLOW, notifications_permission);
- DCHECK_EQ(CONTENT_SETTING_ALLOW, push_content_setting);
+
+ DCHECK(push_content_setting == CONTENT_SETTING_ALLOW ||
+ push_content_setting == CONTENT_SETTING_ASK);
return CONTENT_SETTING_ALLOW;
#else
return CONTENT_SETTING_BLOCK;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment