1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
ash / components / arc / test / fake_net_instance.cc [blame]
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ash/components/arc/test/fake_net_instance.h"
namespace arc {
FakeNetInstance::FakeNetInstance() {}
FakeNetInstance::~FakeNetInstance() = default;
void FakeNetInstance::Init(::mojo::PendingRemote<mojom::NetHost> host_remote,
InitCallback callback) {}
void FakeNetInstance::ScanCompleted() {}
void FakeNetInstance::WifiEnabledStateChanged(bool is_enabled) {}
void FakeNetInstance::DisconnectAndroidVpn() {}
void FakeNetInstance::ConfigureAndroidVpn() {}
void FakeNetInstance::ActiveNetworksChanged(
std::vector<mojom::NetworkConfigurationPtr> network) {}
void FakeNetInstance::DnsResolutionTest(const std::string& transport_name,
const std::string& host_name,
DnsResolutionTestCallback callback) {
mojom::ArcDnsResolutionTestResultPtr result_ptr =
mojom::ArcDnsResolutionTestResult::New();
result_ptr->is_successful = dns_resolution_test_result_.is_successful;
result_ptr->response_code = dns_resolution_test_result_.response_code;
result_ptr->duration_ms = dns_resolution_test_result_.duration_ms;
std::move(callback).Run(std::move(result_ptr));
}
void FakeNetInstance::HttpTest(const std::string& transport_name,
const ::GURL& url,
HttpTestCallback callback) {
mojom::ArcHttpTestResultPtr result_ptr = mojom::ArcHttpTestResult::New();
result_ptr->is_successful = http_test_result_.is_successful;
result_ptr->status_code = http_test_result_.status_code;
result_ptr->duration_ms = http_test_result_.duration_ms;
std::move(callback).Run(std::move(result_ptr));
}
void FakeNetInstance::PingTest(const std::string& transport_name,
const std::string& ip_address,
PingTestCallback callback) {
mojom::ArcPingTestResultPtr result_ptr = mojom::ArcPingTestResult::New();
result_ptr->is_successful = ping_test_result_.is_successful;
result_ptr->duration_ms = ping_test_result_.duration_ms;
std::move(callback).Run(std::move(result_ptr));
}
void FakeNetInstance::SetUpFlag(mojom::Flag flag, bool value) {}
} // namespace arc