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

Unified Diff: chrome/browser/chromeos/attestation/platform_verification_flow.cc

Issue 2713083003: Use ContentSetting in chrome/ instead of PermissionStatus (Closed)
Patch Set: maybe fix android compile + address comments + basic tests 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
« no previous file with comments | « no previous file | chrome/browser/extensions/service_worker_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 17fb0c65f41334932f4b04375bfb18e85b66b827..0b1593952d6c96c40637bf77db404c7e23d9cc7e 100644
--- a/chrome/browser/chromeos/attestation/platform_verification_flow.cc
+++ b/chrome/browser/chromeos/attestation/platform_verification_flow.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/permissions/permission_manager.h"
+#include "chrome/browser/permissions/permission_result.h"
#include "chrome/browser/profiles/profile.h"
#include "chromeos/attestation/attestation.pb.h"
#include "chromeos/attestation/attestation_flow.h"
@@ -112,14 +113,15 @@ class DefaultDelegate : public PlatformVerificationFlow::Delegate {
const GURL& requesting_origin = GetURL(web_contents).GetOrigin();
GURL embedding_origin = web_contents->GetLastCommittedURL().GetOrigin();
- blink::mojom::PermissionStatus status =
+ ContentSetting content_setting =
PermissionManager::Get(
Profile::FromBrowserContext(web_contents->GetBrowserContext()))
->GetPermissionStatus(
CONTENT_SETTINGS_TYPE_PROTECTED_MEDIA_IDENTIFIER,
- requesting_origin, embedding_origin);
+ requesting_origin, embedding_origin)
+ .content_setting;
- return status == blink::mojom::PermissionStatus::GRANTED;
+ return content_setting == CONTENT_SETTING_ALLOW;
}
bool IsInSupportedMode(content::WebContents* web_contents) override {
« no previous file with comments | « no previous file | chrome/browser/extensions/service_worker_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698