Commit eb08cbde authored by Randy Smith's avatar Randy Smith Committed by Commit Bot

Move EffectiveConnectionType and NetworkConnectionType to //services/network.

Bug: 785420
Change-Id: Icc6bf5a17290e714d6f3ed49f3bda0dd4cf22efb
Reviewed-on: https://chromium-review.googlesource.com/852385
Commit-Queue: Randy Smith <rdsmith@chromium.org>
Reviewed-by: default avatarNasko Oskov <nasko@chromium.org>
Reviewed-by: default avatarKen Rockot <rockot@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#529145}
parent bd5c6ab3
......@@ -39,11 +39,6 @@ struct WebPreferences;
[Native]
enum NetworkConnectionType;
// TODO(rockot): This should most likely be defined by network service mojom,
// but the network service doesn't exist yet.
[Native]
enum EffectiveConnectionType;
[Native]
enum WebPopupType;
......
......@@ -20,7 +20,6 @@ public_headers = [
"//content/public/common/renderer_preferences.h",
"//content/public/common/web_preferences.h",
"//net/base/network_change_notifier.h",
"//net/nqe/effective_connection_type.h",
"//third_party/WebKit/public/platform/WebGestureDevice.h",
"//third_party/WebKit/public/platform/WebGestureEvent.h",
"//third_party/WebKit/public/platform/WebInputEvent.h",
......@@ -66,7 +65,6 @@ public_deps = [
type_mappings = [
"content.mojom.Button=blink::WebPointerProperties::Button",
"content.mojom.Cancelability=blink::WebInputEvent::DispatchType",
"content.mojom.EffectiveConnectionType=net::EffectiveConnectionType",
"content.mojom.EditCommand=content::EditCommand",
"content.mojom.Event=std::unique_ptr<content::InputEvent>[move_only]",
"content.mojom.EventType=blink::WebInputEvent::Type",
......
......@@ -9,6 +9,7 @@ import "content/common/service_worker/embedded_worker.mojom";
import "ipc/constants.mojom";
import "mojo/common/time.mojom";
import "mojo/common/unguessable_token.mojom";
import "services/network/public/interfaces/network_types.mojom";
import "services/service_manager/public/interfaces/interface_provider.mojom";
import "ui/gfx/geometry/mojo/geometry.mojom";
import "ui/gfx/mojo/icc_profile.mojom";
......@@ -201,7 +202,8 @@ interface Renderer {
// estimate of the HTTP or transport RTT is unavailable, it will be set to
// net::nqe::internal::InvalidRTT(). If the throughput estimate is
// unavailable, it will be set to net::nqe::internal::INVALID_RTT_THROUGHPUT.
OnNetworkQualityChanged(EffectiveConnectionType effective_connection_type,
OnNetworkQualityChanged(
network.mojom.EffectiveConnectionType effective_connection_type,
mojo.common.mojom.TimeDelta http_rtt,
mojo.common.mojom.TimeDelta transport_rtt,
double bandwidth_kbps);
......
......@@ -45,8 +45,6 @@ IPC_ENUM_TRAITS_VALIDATE(ui::PageTransition,
ui::PageTransition::PAGE_TRANSITION_LAST_CORE))
IPC_ENUM_TRAITS_MAX_VALUE(net::NetworkChangeNotifier::ConnectionType,
net::NetworkChangeNotifier::CONNECTION_LAST)
IPC_ENUM_TRAITS_MAX_VALUE(net::EffectiveConnectionType,
net::EFFECTIVE_CONNECTION_TYPE_LAST - 1)
IPC_ENUM_TRAITS_MAX_VALUE(content::ConsoleMessageLevel,
content::CONSOLE_MESSAGE_LEVEL_LAST)
IPC_ENUM_TRAITS_MAX_VALUE(blink::WebFrameSerializerCacheControlPolicy,
......
......@@ -6,29 +6,22 @@ import("//mojo/public/tools/bindings/mojom.gni")
static_library("cpp") {
sources = [
"cors_error_status.cc",
"cors_error_status.h",
"data_element.cc",
"data_element.h",
"http_raw_request_response_info.cc",
"http_raw_request_response_info.h",
"mutable_network_traffic_annotation_tag_struct_traits.h",
"mutable_partial_network_traffic_annotation_tag_struct_traits.h",
"net_adapters.cc",
"net_adapters.h",
"network_param_ipc_traits.cc",
"network_param_ipc_traits.h",
"proxy_resolving_client_socket.cc",
"proxy_resolving_client_socket.h",
"resource_request.cc",
"resource_request.h",
"resource_request_body.cc",
"resource_request_body.h",
"url_loader_completion_status.cc",
"url_loader_completion_status.h",
]
public_deps = [
":typemap_dependencies",
"//services/network/public/interfaces",
"//url/ipc:url_ipc",
]
......@@ -41,6 +34,28 @@ static_library("cpp") {
]
}
static_library("typemap_dependencies") {
sources = [
"cors_error_status.cc",
"cors_error_status.h",
"http_raw_request_response_info.cc",
"http_raw_request_response_info.h",
"network_param_ipc_traits.cc",
"network_param_ipc_traits.h",
"url_loader_completion_status.cc",
"url_loader_completion_status.h",
]
public_deps = [
"//url/ipc:url_ipc",
]
deps = [
"//base",
"//ipc",
"//net",
"//services/network/public/interfaces:interfaces_shared",
]
}
mojom("test_interfaces") {
sources = [
"network_traits_test_service.mojom",
......
......@@ -16,6 +16,7 @@
#include "net/cert/signed_certificate_timestamp.h"
#include "net/cert/signed_certificate_timestamp_and_status.h"
#include "net/http/http_request_headers.h"
#include "net/nqe/effective_connection_type.h"
#include "net/ssl/ssl_info.h"
#include "net/url_request/redirect_info.h"
#include "services/network/public/cpp/cors_error_status.h"
......@@ -201,4 +202,7 @@ IPC_STRUCT_TRAITS_BEGIN(net::RedirectInfo)
IPC_STRUCT_TRAITS_MEMBER(referred_token_binding_host)
IPC_STRUCT_TRAITS_END()
IPC_ENUM_TRAITS_MAX_VALUE(net::EffectiveConnectionType,
net::EFFECTIVE_CONNECTION_TYPE_LAST - 1)
#endif // SERVICES_NETWORK_PUBLIC_CPP_NETWORK_PARAM_IPC_TRAITS_H_
# Copyright 2018 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.
mojom = "//services/network/public/interfaces/network_types.mojom"
public_deps = [
"//net",
]
public_headers = [ "//net/nqe/effective_connection_type.h" ]
traits_headers = [ "//services/network/public/cpp/network_param_ipc_traits.h" ]
deps = [
"//services/network/public/cpp:typemap_dependencies",
]
type_mappings =
[ "network.mojom.EffectiveConnectionType=net::EffectiveConnectionType" ]
......@@ -7,4 +7,5 @@ typemaps = [
"//services/network/public/cpp/mutable_partial_network_traffic_annotation_tag.typemap",
"//services/network/public/cpp/cookie_manager.typemap",
"//services/network/public/cpp/http_request_headers.typemap",
"//services/network/public/cpp/network_types.typemap",
]
......@@ -14,6 +14,7 @@ mojom("interfaces") {
"mutable_network_traffic_annotation_tag.mojom",
"mutable_partial_network_traffic_annotation_tag.mojom",
"network_change_manager.mojom",
"network_types.mojom",
"request_context_frame_type.mojom",
"restricted_cookie_manager.mojom",
]
......
// Copyright 2018 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.
module network.mojom;
// This file is a collection of network types which rely on legacy IPC
// ParamTraits for serialization. All of these should eventually be converted to
// proper mojom definitions.
[Native]
enum EffectiveConnectionType;
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