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

Unified Diff: chrome/browser/push_messaging/push_messaging_service_impl.cc

Issue 2675483002: Replace PermissionType in chrome/ with ContentSettingsType (Closed)
Patch Set: rebase + include content_settings_types.h more Created 3 years, 10 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/push_messaging/push_messaging_service_impl.cc
diff --git a/chrome/browser/push_messaging/push_messaging_service_impl.cc b/chrome/browser/push_messaging/push_messaging_service_impl.cc
index fbc0c0e932ff2eed5caf85631cf94baaf31b131f..f495134d827fa2465fc3db88c320de47c44b6cd0 100644
--- a/chrome/browser/push_messaging/push_messaging_service_impl.cc
+++ b/chrome/browser/push_messaging/push_messaging_service_impl.cc
@@ -45,7 +45,6 @@
#include "components/rappor/public/rappor_utils.h"
#include "components/rappor/rappor_service_impl.h"
#include "content/public/browser/browser_context.h"
-#include "content/public/browser/permission_type.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/service_worker_context.h"
#include "content/public/browser/storage_partition.h"
@@ -474,8 +473,8 @@ void PushMessagingServiceImpl::SubscribeFromDocument(
}
// Push does not allow permission requests from iframes.
- profile_->GetPermissionManager()->RequestPermission(
- content::PermissionType::PUSH_MESSAGING, web_contents->GetMainFrame(),
+ PermissionManager::Get(profile_)->RequestPermission(
+ CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, web_contents->GetMainFrame(),
requesting_origin, true /* user_gesture */,
base::Bind(&PushMessagingServiceImpl::DoSubscribe,
weak_factory_.GetWeakPtr(), app_identifier, options,
@@ -520,8 +519,8 @@ blink::WebPushPermissionStatus PushMessagingServiceImpl::GetPermissionStatus(
// Because the Push API is tied to Service Workers, many usages of the API
// won't have an embedding origin at all. Only consider the requesting
// |origin| when checking whether permission to use the API has been granted.
- return ToPushPermission(profile_->GetPermissionManager()->GetPermissionStatus(
- content::PermissionType::PUSH_MESSAGING, origin, origin));
+ return ToPushPermission(PermissionManager::Get(profile_)->GetPermissionStatus(
+ CONTENT_SETTINGS_TYPE_PUSH_MESSAGING, origin, origin));
}
bool PushMessagingServiceImpl::SupportNonVisibleMessages() {
« no previous file with comments | « chrome/browser/push_messaging/push_messaging_service_impl.h ('k') | chrome/browser/safe_browsing/permission_reporter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698