Commit efefe7cc authored by Jeffrey Kardatzke's avatar Jeffrey Kardatzke Committed by Commit Bot

Indicate verified access is disabled in guest/incognito modes

This will block usage of the CDM factory daemon on Chrome OS when in
incognito or guest mode. This is required since a unique identifier is
used in that implementation.

BUG=b:153111783
TEST=Verified daemon is not used in incognito/guest mode

Change-Id: Iba59659fe0e331f2f5f5e3bdfce4ff65895e4386
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2485144
Commit-Queue: Jeffrey Kardatzke <jkardatzke@google.com>
Reviewed-by: default avatarXiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819071}
parent 41fd58db
...@@ -14,9 +14,12 @@ ...@@ -14,9 +14,12 @@
#if BUILDFLAG(ENABLE_CDM_STORAGE_ID) #if BUILDFLAG(ENABLE_CDM_STORAGE_ID)
#include "chrome/browser/media/cdm_storage_id.h" #include "chrome/browser/media/cdm_storage_id.h"
#include "chrome/browser/media/media_storage_id_salt.h" #include "chrome/browser/media/media_storage_id_salt.h"
#include "content/public/browser/render_process_host.h"
#endif
#if BUILDFLAG(ENABLE_CDM_STORAGE_ID) || defined(OS_CHROMEOS)
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#endif #endif
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
...@@ -163,6 +166,15 @@ void PlatformVerificationImpl::OnStorageIdResponse( ...@@ -163,6 +166,15 @@ void PlatformVerificationImpl::OnStorageIdResponse(
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
void PlatformVerificationImpl::IsVerifiedAccessEnabled( void PlatformVerificationImpl::IsVerifiedAccessEnabled(
IsVerifiedAccessEnabledCallback callback) { IsVerifiedAccessEnabledCallback callback) {
// If we are in guest/incognito mode, then verified access is effectively
// disabled.
Profile* profile =
Profile::FromBrowserContext(render_frame_host_->GetBrowserContext());
if (profile->IsOffTheRecord() || profile->IsGuestSession()) {
std::move(callback).Run(false);
return;
}
bool enabled_for_device = false; bool enabled_for_device = false;
if (!chromeos::CrosSettings::Get()->GetBoolean( if (!chromeos::CrosSettings::Get()->GetBoolean(
chromeos::kAttestationForContentProtectionEnabled, chromeos::kAttestationForContentProtectionEnabled,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment