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

Unified Diff: chrome/browser/budget_service/budget_service_impl.cc

Issue 2908133003: Split GetPermissionStatus into GetPermissionStatusForFrame/Worker
Patch Set: Split GetPermissionStatus into GetPermissionStatusForFrame/Worker Created 3 years, 6 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/budget_service/budget_service_impl.cc
diff --git a/chrome/browser/budget_service/budget_service_impl.cc b/chrome/browser/budget_service/budget_service_impl.cc
index 4346680fe3379df781d3417f52c9ba899a58d059..b5f42c5cc2ddaa228fb2dff74f4af62fcb2429ad 100644
--- a/chrome/browser/budget_service/budget_service_impl.cc
+++ b/chrome/browser/budget_service/budget_service_impl.cc
@@ -9,6 +9,7 @@
#include "chrome/browser/budget_service/budget_manager_factory.h"
#include "chrome/browser/permissions/permission_manager.h"
#include "chrome/browser/permissions/permission_manager_factory.h"
+#include "chrome/browser/permissions/permission_result.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/browser/permission_type.h"
#include "content/public/browser/render_process_host.h"
@@ -63,9 +64,10 @@ void BudgetServiceImpl::GetBudget(const url::Origin& origin,
// the developer when the notification permission has been granted. This is
// something the impact of which has to be reconsidered when the feature is
// ready to ship for real. See https://crbug.com/710809 for context.
- if (permission_manager->GetPermissionStatus(
- content::PermissionType::NOTIFICATIONS, origin.GetURL(), GURL()) !=
- blink::mojom::PermissionStatus::GRANTED) {
+ if (permission_manager
+ ->GetPermissionStatus(CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
johnme 2017/06/12 10:18:20 This loses the call to UpdatePermissionStatusWithD
+ origin.GetURL(), GURL())
+ .content_setting != CONTENT_SETTING_ALLOW) {
blink::mojom::BudgetStatePtr empty_state(blink::mojom::BudgetState::New());
empty_state->budget_at = 0;
empty_state->time =

Powered by Google App Engine
This is Rietveld 408576698