Index: chrome/browser/chromeos/attestation/platform_verification_flow.cc |
diff --git a/chrome/browser/chromeos/attestation/platform_verification_flow.cc b/chrome/browser/chromeos/attestation/platform_verification_flow.cc |
index 794ed3ab3b752afb0adc01945d193650b8815389..70590d5dfd651e349b80ff9e91aaebe8b1fa6f02 100644 |
--- a/chrome/browser/chromeos/attestation/platform_verification_flow.cc |
+++ b/chrome/browser/chromeos/attestation/platform_verification_flow.cc |
@@ -17,8 +17,7 @@ |
#include "chrome/browser/chromeos/attestation/attestation_signed_data.pb.h" |
#include "chrome/browser/chromeos/profiles/profile_helper.h" |
#include "chrome/browser/chromeos/settings/cros_settings.h" |
-#include "chrome/browser/media/protected_media_identifier_permission_context.h" |
-#include "chrome/browser/media/protected_media_identifier_permission_context_factory.h" |
+#include "chrome/browser/permissions/permission_manager.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chromeos/attestation/attestation_flow.h" |
#include "chromeos/chromeos_switches.h" |
@@ -38,6 +37,7 @@ |
#include "content/public/common/url_constants.h" |
#include "net/cert/pem_tokenizer.h" |
#include "net/cert/x509_certificate.h" |
+#include "third_party/WebKit/public/platform/modules/permissions/permission_status.mojom.h" |
namespace { |
@@ -105,21 +105,20 @@ class DefaultDelegate : public PlatformVerificationFlow::Delegate { |
} |
bool IsPermittedByUser(content::WebContents* web_contents) override { |
- ProtectedMediaIdentifierPermissionContext* permission_context = |
- ProtectedMediaIdentifierPermissionContextFactory::GetForProfile( |
- Profile::FromBrowserContext(web_contents->GetBrowserContext())); |
- |
// TODO(xhwang): Using delegate_->GetURL() here is not right. The platform |
// verification may be requested by a frame from a different origin. This |
// will be solved when http://crbug.com/454847 is fixed. |
const GURL& requesting_origin = GetURL(web_contents).GetOrigin(); |
GURL embedding_origin = web_contents->GetLastCommittedURL().GetOrigin(); |
- |
- ContentSetting content_setting = permission_context->GetPermissionStatus( |
- requesting_origin, embedding_origin); |
- |
- return content_setting == CONTENT_SETTING_ALLOW; |
+ blink::mojom::PermissionStatus status = |
+ PermissionManager::Get( |
+ Profile::FromBrowserContext(web_contents->GetBrowserContext())) |
+ ->GetPermissionStatus( |
+ content::PermissionType::PROTECTED_MEDIA_IDENTIFIER, |
+ requesting_origin, embedding_origin); |
+ |
+ return status == blink::mojom::PermissionStatus::GRANTED; |
} |
bool IsInSupportedMode(content::WebContents* web_contents) override { |