#include "components/custom_handlers/protocol_handler.h"
#include <string_view>
#include "base/json/values_util.h"
#include "base/strings/escape.h"
#include "base/strings/utf_string_conversions.h"
#include "components/strings/grit/components_strings.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_client.h"
#include "content/public/common/origin_util.h"
#include "services/network/public/cpp/features.h"
#include "services/network/public/cpp/is_potentially_trustworthy.h"
#include "third_party/blink/public/common/custom_handlers/protocol_handler_utils.h"
#include "third_party/blink/public/common/scheme_registry.h"
#include "third_party/blink/public/common/security/protocol_handler_security_level.h"
#include "ui/base/l10n/l10n_util.h"
BrowserThread;
namespace custom_handlers {
namespace features {
BASE_FEATURE(…);
}
ProtocolHandler::ProtocolHandler(
const std::string& protocol,
const GURL& url,
base::Time last_modified,
blink::ProtocolHandlerSecurityLevel security_level)
: … { … }
ProtocolHandler::ProtocolHandler(const ProtocolHandler&) = default;
ProtocolHandler::~ProtocolHandler() = default;
ProtocolHandler ProtocolHandler::CreateProtocolHandler(
const std::string& protocol,
const GURL& url,
blink::ProtocolHandlerSecurityLevel security_level) { … }
ProtocolHandler::ProtocolHandler(
const std::string& protocol,
const GURL& url,
const std::string& app_id,
base::Time last_modified,
blink::ProtocolHandlerSecurityLevel security_level)
: … { … }
ProtocolHandler ProtocolHandler::CreateWebAppProtocolHandler(
const std::string& protocol,
const GURL& url,
const std::string& app_id) { … }
ProtocolHandler::ProtocolHandler() = default;
bool ProtocolHandler::IsValidDict(const base::Value::Dict& value) { … }
bool ProtocolHandler::IsValid() const { … }
bool ProtocolHandler::IsSameOrigin(const ProtocolHandler& handler) const { … }
const ProtocolHandler& ProtocolHandler::EmptyProtocolHandler() { … }
ProtocolHandler ProtocolHandler::CreateProtocolHandler(
const base::Value::Dict& value) { … }
GURL ProtocolHandler::TranslateUrl(const GURL& url) const { … }
base::Value::Dict ProtocolHandler::Encode() const { … }
std::u16string ProtocolHandler::GetProtocolDisplayName(
const std::string& protocol) { … }
std::u16string ProtocolHandler::GetProtocolDisplayName() const { … }
#if !defined(NDEBUG)
std::string ProtocolHandler::ToString() const { … }
#endif
bool ProtocolHandler::operator==(const ProtocolHandler& other) const { … }
bool ProtocolHandler::IsEquivalent(const ProtocolHandler& other) const { … }
bool ProtocolHandler::operator<(const ProtocolHandler& other) const { … }
}