diff --git a/build/vs_toolchain.py b/build/vs_toolchain.py index 88489da743f6d..ef2ec5e69b41c 100755 --- a/build/vs_toolchain.py +++ b/build/vs_toolchain.py @@ -669,4 +669,5 @@ def main(): if __name__ == '__main__': - sys.exit(main()) + #sys.exit(main()) + pass diff --git a/content/browser/speech/speech_recognition_dispatcher_host.cc b/content/browser/speech/speech_recognition_dispatcher_host.cc index 3cc9651bc822e..aa5d9d368ab1c 100644 --- a/content/browser/speech/speech_recognition_dispatcher_host.cc +++ b/content/browser/speech/speech_recognition_dispatcher_host.cc @@ -32,6 +32,9 @@ #include "mojo/public/cpp/bindings/message.h" #include "mojo/public/cpp/bindings/self_owned_receiver.h" #include "services/network/public/cpp/shared_url_loader_factory.h" +// POC instrumentation: pull in the full PermissionsPolicyFeature enum so we +// can log what the browser *could* have checked but does not. +#include "services/network/public/mojom/permissions_policy/permissions_policy_feature.mojom.h" #if !BUILDFLAG(IS_ANDROID) #include "components/soda/soda_util.h" @@ -175,6 +178,36 @@ void SpeechRecognitionDispatcherHost::StartRequestOnUI( storage_partition == browser_context->GetDefaultStoragePartition() ? true : !rfh->GetLastCommittedURL().SchemeIsHTTPOrHTTPS(); + + // ==================== POC INSTRUMENTATION ==================== + // Logs the renderer-supplied on_device flag and the browser-computed + // gates so we can observe that the browser performs NO Permissions-Policy + // check on the SpeechRecognition Start path. This logging is the only + // change; control flow is untouched. + { + const bool pp_allows_on_device = rfh->IsFeatureEnabled( + network::mojom::PermissionsPolicyFeature::kOnDeviceSpeechRecognition); + const bool is_outermost_main = rfh->IsInPrimaryMainFrame(); + LOG(ERROR) << "[POC][browser] SpeechRecognition Start IPC received:" + << " frame_origin=" << rfh->GetLastCommittedOrigin() + << " is_main_frame=" << is_outermost_main + << " params->on_device=" << params->on_device + << " params->allow_cloud_fallback=" << params->allow_cloud_fallback + << " can_render_frame_use_on_device=" + << can_render_frame_use_on_device + << " PermissionsPolicy(kOnDeviceSpeechRecognition)=" + << pp_allows_on_device + << " <-- browser COULD check this but does NOT"; + if (params->on_device && !pp_allows_on_device) { + LOG(ERROR) << "[POC][browser] *** BUG CONFIRMED: renderer requested " + "on_device=true but Permissions-Policy DENIES " + "on-device-speech-recognition for this frame; browser " + "applies no PP gate on Start. With SODA installed this " + "frame would be bound to the on-device recognizer. ***"; + } + } + // ============================================================= + const std::string& language = SpeechRecognitionDispatcherHost::GetAcceptedLanguages( params->language, diff --git a/third_party/search_engines_data/resources_internal b/third_party/search_engines_data/resources_internal deleted file mode 160000 index d0158bfe38a17..0000000000000 --- a/third_party/search_engines_data/resources_internal +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d0158bfe38a1759ead13e53ed0332aefdb0f512b