Commit f61e1b46 authored by Domenic Denicola's avatar Domenic Denicola Committed by Chromium LUCI CQ

Remove dead origin isolation opt-in hints code

This was missed in 7dbd3d17.

Bug: 751996, 1158853
Change-Id: Ia4c7a56eb397c2c3a40ce69e87f7d1a945940552
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2627091Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Reviewed-by: default avatarCharlie Reis <creis@chromium.org>
Commit-Queue: Domenic Denicola <domenic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#843231}
parent 3cadf6b5
......@@ -11,7 +11,6 @@
#include "base/memory/ptr_util.h"
#include "base/optional.h"
#include "base/values.h"
#include "services/network/public/cpp/isolation_opt_in_hints.h"
#include "url/gurl.h"
#include "url/origin.h"
......
......@@ -4,7 +4,6 @@
#include "services/network/origin_policy/origin_policy_parser.h"
#include "base/strings/stringprintf.h"
#include "services/network/public/cpp/isolation_opt_in_hints.h"
#include "services/network/public/mojom/origin_policy_manager.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
......
......@@ -236,8 +236,6 @@ component("cpp_base") {
"http_request_headers_mojom_traits.h",
"isolation_info_mojom_traits.cc",
"isolation_info_mojom_traits.h",
"isolation_opt_in_hints.cc",
"isolation_opt_in_hints.h",
"mutable_network_traffic_annotation_tag_mojom_traits.h",
"mutable_partial_network_traffic_annotation_tag_mojom_traits.h",
"net_ipc_param_traits.cc",
......
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "services/network/public/cpp/isolation_opt_in_hints.h"
#include <type_traits>
namespace network {
IsolationOptInHints GetIsolationOptInHintFromString(
const std::string& hint_str) {
if (hint_str == "prefer_isolated_event_loop")
return IsolationOptInHints::PREFER_ISOLATED_EVENT_LOOP;
if (hint_str == "prefer_isolated_memory")
return IsolationOptInHints::PREFER_ISOLATED_MEMORY;
if (hint_str == "for_side_channel_protection")
return IsolationOptInHints::FOR_SIDE_CHANNEL_PROTECTION;
if (hint_str == "for_memory_measurement")
return IsolationOptInHints::FOR_MEMORY_ISOLATION;
return IsolationOptInHints::NO_HINTS;
}
IsolationOptInHints& operator|=(IsolationOptInHints& lhs,
IsolationOptInHints& rhs) {
lhs = static_cast<IsolationOptInHints>(
static_cast<std::underlying_type<IsolationOptInHints>::type>(lhs) |
static_cast<std::underlying_type<IsolationOptInHints>::type>(rhs));
return lhs;
}
IsolationOptInHints& operator&(IsolationOptInHints& lhs,
IsolationOptInHints& rhs) {
lhs = static_cast<IsolationOptInHints>(
static_cast<std::underlying_type<IsolationOptInHints>::type>(lhs) &
static_cast<std::underlying_type<IsolationOptInHints>::type>(rhs));
return lhs;
}
} // namespace network
// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SERVICES_NETWORK_PUBLIC_CPP_ISOLATION_OPT_IN_HINTS_H_
#define SERVICES_NETWORK_PUBLIC_CPP_ISOLATION_OPT_IN_HINTS_H_
#include <string>
#include "base/component_export.h"
namespace network {
// The following definitions correspond to the draft spec found here:
// https://github.com/domenic/origin-isolation#proposed-hints.
enum class IsolationOptInHints : unsigned {
NO_HINTS = 0x0,
PREFER_ISOLATED_EVENT_LOOP = 0x1,
PREFER_ISOLATED_MEMORY = 0x2,
FOR_SIDE_CHANNEL_PROTECTION = 0x4,
FOR_MEMORY_ISOLATION = 0x8,
ALL_HINTS_ACTIVE = 0xF
};
// Converts hint strings into their corresponding IsolationOptInHints values.
// The hint strings are specified at
// https://github.com/domenic/origin-isolation#proposed-hints.
COMPONENT_EXPORT(NETWORK_CPP_BASE)
IsolationOptInHints GetIsolationOptInHintFromString(
const std::string& hint_str);
COMPONENT_EXPORT(NETWORK_CPP_BASE)
IsolationOptInHints& operator|=(IsolationOptInHints& lhs,
IsolationOptInHints& rhs);
COMPONENT_EXPORT(NETWORK_CPP_BASE)
IsolationOptInHints& operator&(IsolationOptInHints& lhs,
IsolationOptInHints& rhs);
} // namespace network
#endif // SERVICES_NETWORK_PUBLIC_CPP_ISOLATION_OPT_IN_HINTS_H_
......@@ -25,7 +25,6 @@
#include "net/nqe/effective_connection_type.h"
#include "net/ssl/ssl_cert_request_info.h"
#include "net/ssl/ssl_info.h"
#include "services/network/public/cpp/isolation_opt_in_hints.h"
#include "services/network/public/cpp/net_ipc_param_traits.h"
#include "services/network/public/cpp/origin_policy.h"
#include "services/network/public/cpp/resource_request_body.h"
......@@ -132,9 +131,6 @@ IPC_ENUM_TRAITS_MAX_VALUE(network::mojom::TrustTokenOperationStatus,
IPC_ENUM_TRAITS_MAX_VALUE(network::OriginPolicyState,
network::OriginPolicyState::kMaxValue)
IPC_ENUM_TRAITS_MAX_VALUE(network::IsolationOptInHints,
network::IsolationOptInHints::ALL_HINTS_ACTIVE)
IPC_STRUCT_TRAITS_BEGIN(network::OriginPolicyContents)
IPC_STRUCT_TRAITS_MEMBER(ids)
IPC_STRUCT_TRAITS_MEMBER(feature_policy)
......
......@@ -10,7 +10,6 @@
#include <vector>
#include "base/optional.h"
#include "services/network/public/cpp/isolation_opt_in_hints.h"
#include "url/gurl.h"
namespace network {
......
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