Remove content::IsPdfInternalPluginAllowedOrigin()
With recent code refactoring in https://crrev.com/c/6196281, this function is now dead code. Also remove ContentClient::GetPdfInternalPluginAllowedOrigins() and its override, as those are dead code too. Bug: 392037570 Change-Id: I3119d4766677bc5f47e5a1b1c40ce66414003256 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6196282 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Cr-Commit-Position: refs/heads/main@{#1411244}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
6d99adc636
commit
fa9de55cce
chrome/common
content/public/common
@ -34,7 +34,6 @@
|
||||
#include "chrome/common/media/cdm_registration.h"
|
||||
#include "chrome/common/ppapi_utils.h"
|
||||
#include "chrome/common/url_constants.h"
|
||||
#include "chrome/common/webui_url_constants.h"
|
||||
#include "chrome/grit/common_resources.h"
|
||||
#include "chrome/grit/generated_resources.h"
|
||||
#include "components/crash/core/common/crash_key.h"
|
||||
@ -192,11 +191,6 @@ void ChromeContentClient::AddPlugins(
|
||||
#endif // BUILDFLAG(ENABLE_NACL)
|
||||
}
|
||||
|
||||
std::vector<url::Origin>
|
||||
ChromeContentClient::GetPdfInternalPluginAllowedOrigins() {
|
||||
return {url::Origin::Create(GURL(chrome::kChromeUIPrintURL))};
|
||||
}
|
||||
|
||||
void ChromeContentClient::AddContentDecryptionModules(
|
||||
std::vector<content::CdmInfo>* cdms,
|
||||
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) {
|
||||
|
@ -58,7 +58,6 @@ class ChromeContentClient : public content::ContentClient {
|
||||
void SetActiveURL(const GURL& url, std::string top_origin) override;
|
||||
void SetGpuInfo(const gpu::GPUInfo& gpu_info) override;
|
||||
void AddPlugins(std::vector<content::ContentPluginInfo>* plugins) override;
|
||||
std::vector<url::Origin> GetPdfInternalPluginAllowedOrigins() override;
|
||||
void AddContentDecryptionModules(
|
||||
std::vector<content::CdmInfo>* cdms,
|
||||
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
|
||||
|
@ -95,10 +95,6 @@ ContentClient::ContentClient()
|
||||
ContentClient::~ContentClient() {
|
||||
}
|
||||
|
||||
std::vector<url::Origin> ContentClient::GetPdfInternalPluginAllowedOrigins() {
|
||||
return {};
|
||||
}
|
||||
|
||||
std::u16string ContentClient::GetLocalizedString(int message_id) {
|
||||
return std::u16string();
|
||||
}
|
||||
|
@ -103,9 +103,6 @@ class CONTENT_EXPORT ContentClient {
|
||||
// Gives the embedder a chance to register its own plugins.
|
||||
virtual void AddPlugins(std::vector<content::ContentPluginInfo>* plugins) {}
|
||||
|
||||
// Returns a list of origins that are allowed to use PDF internal plugin.
|
||||
virtual std::vector<url::Origin> GetPdfInternalPluginAllowedOrigins();
|
||||
|
||||
// Gives the embedder a chance to register the Content Decryption Modules
|
||||
// (CDM) it supports, as well as the CDM host file paths to verify CDM host.
|
||||
// |cdms| or |cdm_host_file_paths| can be null which means that specific list
|
||||
|
@ -9,12 +9,10 @@
|
||||
#include <string_view>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/containers/contains.h"
|
||||
#include "base/containers/fixed_flat_set.h"
|
||||
#include "base/feature_list.h"
|
||||
#include "build/build_config.h"
|
||||
#include "content/common/url_schemes.h"
|
||||
#include "content/public/common/content_client.h"
|
||||
#include "content/public/common/content_features.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "third_party/blink/public/common/chrome_debug_urls.h"
|
||||
@ -34,11 +32,6 @@ bool HasWebUIOrigin(const url::Origin& origin) {
|
||||
origin.scheme() == content::kChromeDevToolsScheme;
|
||||
}
|
||||
|
||||
bool IsPdfInternalPluginAllowedOrigin(const url::Origin& origin) {
|
||||
return base::Contains(
|
||||
GetContentClient()->GetPdfInternalPluginAllowedOrigins(), origin);
|
||||
}
|
||||
|
||||
bool IsSavableURL(const GURL& url) {
|
||||
for (auto& scheme : GetSavableSchemes()) {
|
||||
if (url.SchemeIs(scheme))
|
||||
|
@ -19,9 +19,6 @@ CONTENT_EXPORT bool HasWebUIScheme(const GURL& url);
|
||||
// Returns true if the origin is a WebUI.
|
||||
CONTENT_EXPORT bool HasWebUIOrigin(const url::Origin& origin);
|
||||
|
||||
// Returns true if the origin is allowed to access the PDF internal plugin.
|
||||
CONTENT_EXPORT bool IsPdfInternalPluginAllowedOrigin(const url::Origin& origin);
|
||||
|
||||
// Check whether we can do the saving page operation for the specified URL.
|
||||
CONTENT_EXPORT bool IsSavableURL(const GURL& url);
|
||||
|
||||
|
Reference in New Issue
Block a user