0

Migrate //chromeos/ash/components/network to namespace ash [9/N]

This CL migrates remaining files to namespace ash from chromeos.

This CL is part of the Chrome OS source code directory migration:
https://docs.google.com/document/d/1g-98HpzA8XcoGBWUv1gQNr4rbnD5yfvbtYZyPDDbkaE.

Bug: 1164001
Change-Id: If75617355585da7891a52236dc8b472d561eb227
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3815105
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Yeunjoo Choi <ychoi@igalia.com>
Owners-Override: Hidehiko Abe <hidehiko@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1032884}
This commit is contained in:
Yeunjoo Choi
2022-08-09 06:11:08 +00:00
committed by Chromium LUCI CQ
parent f888fd2a61
commit 427ff7a6d3
105 changed files with 292 additions and 356 deletions
ash
chrome/browser
chromeos
components/proxy_config
content/browser/renderer_host/pepper
extensions/browser/api/socket

@ -83,7 +83,7 @@ ash::NetworkProfileHandler* GetNetworkProfileHandler() {
return chromeos::NetworkHandler::Get()->network_profile_handler();
}
const chromeos::NetworkProfile* GetNetworkProfile() {
const ash::NetworkProfile* GetNetworkProfile() {
return GetNetworkProfileHandler()->GetProfileForUserhash(
chromeos::LoginState::Get()->primary_user_hash());
}

@ -11,8 +11,6 @@
// TODO(https://crbug.com/1164001): move to forward declaration
#include "ash/services/secure_channel/public/cpp/client/secure_channel_client.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_connect.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_state_handler.h"
class PrefService;
@ -27,6 +25,7 @@ namespace device_sync {
class DeviceSyncClient;
}
class NetworkConnect;
class NetworkConnectionHandler;
namespace tether {

@ -13,8 +13,6 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_connect.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_state_handler.h"
#include "components/prefs/pref_registry_simple.h"
#include "device/bluetooth/bluetooth_adapter.h"
@ -36,6 +34,7 @@ class DeviceSyncClient;
}
class ManagedNetworkConfigurationHandler;
class NetworkConnect;
class NetworkConnectionHandler;
namespace tether {

@ -14,10 +14,6 @@
#include "base/timer/timer.h"
#include "base/values.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_connect.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_state.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_state_handler.h"
#include "chromeos/ash/components/network/network_state_handler_observer.h"
@ -27,6 +23,9 @@ class TaskRunner;
namespace ash {
class NetworkConnect;
class NetworkState;
namespace tether {
// Connects to a Wi-Fi hotspot, given an SSID and password.

@ -9,8 +9,6 @@
#include "base/memory/weak_ptr.h"
#include "chromeos/ash/components/dbus/hermes/hermes_profile_client.h"
#include "chromeos/ash/components/dbus/hermes/hermes_response_status.h"
// TODO(https://crbug.com/1164001): move to forward declaration.
#include "chromeos/ash/components/network/cellular_esim_profile.h"
#include "chromeos/ash/components/network/cellular_inhibitor.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
@ -18,7 +16,11 @@ namespace dbus {
class ObjectPath;
}
namespace ash::cellular_setup {
namespace ash {
class CellularESimProfile;
namespace cellular_setup {
class Euicc;
class ESimManager;
@ -117,6 +119,7 @@ class ESimProfile : public mojom::ESimProfile {
base::WeakPtrFactory<ESimProfile> weak_ptr_factory_{this};
};
} // namespace ash::cellular_setup
} // namespace cellular_setup
} // namespace ash
#endif // ASH_SERVICES_CELLULAR_SETUP_ESIM_PROFILE_H_

@ -9,8 +9,6 @@
#include "base/gtest_prod_util.h"
#include "chromeos/ash/components/dbus/hermes/hermes_euicc_client.h"
#include "chromeos/ash/components/dbus/hermes/hermes_profile_client.h"
// TODO(https://crbug.com/1164001): move to forward declaration.
#include "chromeos/ash/components/network/cellular_esim_profile.h"
#include "chromeos/ash/components/network/cellular_inhibitor.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
@ -18,7 +16,11 @@ namespace dbus {
class ObjectPath;
}
namespace ash::cellular_setup {
namespace ash {
class CellularESimProfile;
namespace cellular_setup {
class ESimProfile;
class ESimManager;
@ -114,6 +116,7 @@ class Euicc : public mojom::Euicc {
base::WeakPtrFactory<Euicc> weak_ptr_factory_{this};
};
} // namespace ash::cellular_setup
} // namespace cellular_setup
} // namespace ash
#endif // ASH_SERVICES_CELLULAR_SETUP_EUICC_H_

@ -46,9 +46,9 @@ class AutoConnectNotifierTest : public AshTestBase {
~AutoConnectNotifierTest() override = default;
void SetUp() override {
chromeos::SystemTokenCertDbStorage::Initialize();
chromeos::NetworkCertLoader::Initialize();
chromeos::NetworkCertLoader::ForceAvailableForNetworkAuthForTesting();
SystemTokenCertDbStorage::Initialize();
NetworkCertLoader::Initialize();
NetworkCertLoader::ForceAvailableForNetworkAuthForTesting();
network_handler_test_helper_ = std::make_unique<NetworkHandlerTestHelper>();
CHECK(chromeos::NetworkHandler::Get()->auto_connect_handler());
network_config_helper_ = std::make_unique<
@ -75,8 +75,8 @@ class AutoConnectNotifierTest : public AshTestBase {
AshTestBase::TearDown();
network_config_helper_.reset();
network_handler_test_helper_.reset();
chromeos::NetworkCertLoader::Shutdown();
chromeos::SystemTokenCertDbStorage::Shutdown();
NetworkCertLoader::Shutdown();
SystemTokenCertDbStorage::Shutdown();
}
void NotifyConnectToNetworkRequested() {

@ -43,8 +43,8 @@ class CellularSetupNotifierTest : public NoSessionAshTestBase {
~CellularSetupNotifierTest() override = default;
void SetUp() override {
chromeos::SystemTokenCertDbStorage::Initialize();
chromeos::NetworkCertLoader::Initialize();
SystemTokenCertDbStorage::Initialize();
NetworkCertLoader::Initialize();
chromeos::shill_clients::InitializeFakes();
hermes_clients::InitializeFakes();
chromeos::NetworkHandler::Initialize();
@ -69,8 +69,8 @@ class CellularSetupNotifierTest : public NoSessionAshTestBase {
chromeos::NetworkHandler::Shutdown();
hermes_clients::Shutdown();
chromeos::shill_clients::Shutdown();
chromeos::NetworkCertLoader::Shutdown();
chromeos::SystemTokenCertDbStorage::Shutdown();
NetworkCertLoader::Shutdown();
SystemTokenCertDbStorage::Shutdown();
}
// Returns the cellular setup notification if it is shown, and null if it is

@ -181,7 +181,7 @@ void NetworkDetailedViewController::OnNetworkListItemSelected(
UserMetricsAction("StatusArea_Network_ConnectConfigured"));
LogUserNetworkEvent(*network.get());
RecordNetworkRowClickedAction(NetworkRowClickedAction::kConnectToNetwork);
chromeos::NetworkConnect::Get()->ConnectToNetworkId(network->guid);
NetworkConnect::Get()->ConnectToNetworkId(network->guid);
return;
}
}

@ -58,7 +58,7 @@ constexpr char kNetworkConnectionDetails[] =
const std::string kNetworkTechnologyWiFi = "WiFi";
const std::string kNetworkTechnologyMobile = "Mobile";
class NetworkConnectTestDelegate : public chromeos::NetworkConnect::Delegate {
class NetworkConnectTestDelegate : public NetworkConnect::Delegate {
public:
NetworkConnectTestDelegate() {}
@ -96,7 +96,7 @@ class NetworkDetailedViewControllerTest : public AshTestBase {
// Creating a service here, since we would be testing that wifi,
// networks which can be connected to are actually connected to. This
// checks that chromeos::NetworkConnect eventually connects us to the
// checks that NetworkConnect eventually connects us to the
// network.
wifi_service_path_ =
network_state_helper()->ConfigureService(base::StringPrintf(
@ -106,7 +106,7 @@ class NetworkDetailedViewControllerTest : public AshTestBase {
kWifi));
network_connect_delegate_ = std::make_unique<NetworkConnectTestDelegate>();
chromeos::NetworkConnect::Initialize(network_connect_delegate_.get());
NetworkConnect::Initialize(network_connect_delegate_.get());
AshTestBase::SetUp();
feature_list_.InitAndEnableFeature(features::kQuickSettingsNetworkRevamp);
@ -119,7 +119,7 @@ class NetworkDetailedViewControllerTest : public AshTestBase {
void TearDown() override {
network_detailed_view_controller_.reset();
AshTestBase::TearDown();
chromeos::NetworkConnect::Shutdown();
NetworkConnect::Shutdown();
chromeos::NetworkHandler::Shutdown();
network_connect_delegate_.reset();
}

@ -297,7 +297,7 @@ void NetworkStateListDetailedView::HandleViewClickedImpl(
RecordNetworkRowClickedAction(
NetworkRowClickedAction::kConnectToNetwork);
}
chromeos::NetworkConnect::Get()->ConnectToNetworkId(network->guid);
NetworkConnect::Get()->ConnectToNetworkId(network->guid);
return;
}
}

@ -290,9 +290,8 @@ void VPNListNetworkEntry::UpdateFromNetworkState(
if (IsVpnConfigAllowed()) {
disconnect_button_ = TrayPopupUtils::CreateTrayPopupButton(
// TODO(stevenjb): Replace with mojo API. https://crbug.com/862420.
base::BindRepeating(
&chromeos::NetworkConnect::DisconnectFromNetworkId,
base::Unretained(chromeos::NetworkConnect::Get()), guid_),
base::BindRepeating(&NetworkConnect::DisconnectFromNetworkId,
base::Unretained(NetworkConnect::Get()), guid_),
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_VPN_DISCONNECT));
disconnect_button_->SetAccessibleName(l10n_util::GetStringFUTF16(
IDS_ASH_STATUS_TRAY_NETWORK_DISCONNECT_BUTTON_A11Y_LABEL, label));

@ -546,7 +546,7 @@ void CertStoreServiceTest::CheckInstalledCerts(
std::string hex_encoded_id =
base::HexEncode(cert_id.data(), cert_id.size());
EXPECT_EQ(hex_encoded_id,
chromeos::NetworkCertLoader::GetPkcs11IdAndSlotForCert(
ash::NetworkCertLoader::GetPkcs11IdAndSlotForCert(
nss_cert.get(), &slot_id));
EXPECT_TRUE(PlaceholdersContainIdAndSlot(cert_id, cert.test_data.slot));
break;

@ -568,7 +568,7 @@ void ArcSettingsServiceImpl::SyncLocationServiceEnabled() const {
// multi-network support so we should sync per-network proxy configuration.
void ArcSettingsServiceImpl::SyncProxySettings() const {
std::unique_ptr<ProxyConfigDictionary> proxy_config_dict =
chromeos::ProxyConfigServiceImpl::GetActiveProxyConfigDictionary(
ash::ProxyConfigServiceImpl::GetActiveProxyConfigDictionary(
GetPrefs(), g_browser_process->local_state());
ProxyPrefs::ProxyMode mode;

@ -306,8 +306,7 @@ class ArcSettingsServiceTest : public InProcessBrowserTest {
->network_state_handler()
->GetNetworkState(service_path);
ASSERT_TRUE(network);
chromeos::proxy_config::SetProxyConfigForNetwork(proxy_config_dict,
*network);
ash::proxy_config::SetProxyConfigForNetwork(proxy_config_dict, *network);
}
std::unique_ptr<FakeIntentHelperInstance> fake_intent_helper_instance_;
@ -608,7 +607,7 @@ IN_PROC_BROWSER_TEST_F(ArcSettingsServiceTest, TwoSourcesTest) {
->network_state_handler()
->DefaultNetwork();
ASSERT_TRUE(network);
chromeos::proxy_config::SetProxyConfigForNetwork(proxy_config_dict, *network);
ash::proxy_config::SetProxyConfigForNetwork(proxy_config_dict, *network);
RunUntilIdle();
base::Value expected_proxy_config(base::Value::Type::DICTIONARY);

@ -194,8 +194,8 @@ void NetworkSettingsServiceAsh::DetermineEffectiveProxy() {
if (!pref_service)
return;
crosapi::mojom::ProxyConfigPtr new_proxy_config = ProxyConfigToCrosapiProxy(
chromeos::ProxyConfigServiceImpl::GetActiveProxyConfigDictionary(
pref_service, local_state_)
ash::ProxyConfigServiceImpl::GetActiveProxyConfigDictionary(pref_service,
local_state_)
.get(),
cached_wpad_url_);

@ -208,7 +208,7 @@ void VpnServiceForExtensionAsh::CreateConfiguration(
// Since the API is only designed to be used with the primary profile, it's
// safe to get the hash of the primary profile here.
const chromeos::NetworkProfile* profile =
const ash::NetworkProfile* profile =
chromeos::NetworkHandler::Get()
->network_profile_handler()
->GetProfileForUserhash(ash::ProfileHelper::GetUserIdHashFromProfile(

@ -722,8 +722,7 @@ class ProxyAuthLockscreenWebUiTest : public LockscreenWebUiTest {
ASSERT_EQ(network->guid(),
FakeShillManagerClient::kFakeEthernetNetworkGuid);
chromeos::proxy_config::SetProxyConfigForNetwork(proxy_config_dict,
*network);
proxy_config::SetProxyConfigForNetwork(proxy_config_dict, *network);
base::RunLoop().RunUntilIdle();
}

@ -119,8 +119,6 @@
namespace ash {
namespace {
// TODO(https://crbug.com/1164001): remove after the class is migrated
using ::chromeos::ProxyConfigServiceImpl;
using ::content::BrowserThread;
// A string pref that gets set when a device local account is removed but a

@ -257,8 +257,8 @@ void BrowserPolicyConnectorAsh::Init(
ash::CrosSettings::Get(),
DeviceNetworkConfigurationUpdaterAsh::DeviceAssetIDFetcher());
// NetworkCertLoader may be not initialized in tests.
if (chromeos::NetworkCertLoader::IsInitialized()) {
chromeos::NetworkCertLoader::Get()->SetDevicePolicyCertificateProvider(
if (ash::NetworkCertLoader::IsInitialized()) {
ash::NetworkCertLoader::Get()->SetDevicePolicyCertificateProvider(
device_network_configuration_updater_.get());
}
@ -345,9 +345,8 @@ void BrowserPolicyConnectorAsh::Shutdown() {
system_proxy_handler_.reset();
// NetworkCertLoader may be not initialized in tests.
if (chromeos::NetworkCertLoader::IsInitialized()) {
chromeos::NetworkCertLoader::Get()->SetDevicePolicyCertificateProvider(
nullptr);
if (ash::NetworkCertLoader::IsInitialized()) {
ash::NetworkCertLoader::Get()->SetDevicePolicyCertificateProvider(nullptr);
}
device_network_configuration_updater_.reset();

@ -2163,7 +2163,7 @@ IN_PROC_BROWSER_TEST_F(DeviceLocalAccountWarnings, NoLoginWarningShown) {
class ManagedSessionsTest : public DeviceLocalAccountTest {
protected:
class CertsObserver : public chromeos::PolicyCertificateProvider::Observer {
class CertsObserver : public ash::PolicyCertificateProvider::Observer {
public:
explicit CertsObserver(base::OnceClosure on_change)
: on_change_(std::move(on_change)) {}

@ -217,14 +217,14 @@ class ScopedNetworkPolicyApplicationObserver
};
class ScopedNetworkCertLoaderRefreshWaiter
: public chromeos::NetworkCertLoader::Observer {
: public ash::NetworkCertLoader::Observer {
public:
ScopedNetworkCertLoaderRefreshWaiter() {
chromeos::NetworkCertLoader::Get()->AddObserver(this);
ash::NetworkCertLoader::Get()->AddObserver(this);
}
~ScopedNetworkCertLoaderRefreshWaiter() override {
chromeos::NetworkCertLoader::Get()->RemoveObserver(this);
ash::NetworkCertLoader::Get()->RemoveObserver(this);
}
void OnCertificatesLoaded() override { run_loop_.Quit(); }
@ -339,8 +339,7 @@ class NetworkPolicyApplicationTest : public ash::LoginManagerTest {
const std::string& key_filename) {
// Before importing, configure NetworkCertLoader to assume that all
// certificates can be used for network authentication.
chromeos::NetworkCertLoader::Get()
->ForceAvailableForNetworkAuthForTesting();
ash::NetworkCertLoader::Get()->ForceAvailableForNetworkAuthForTesting();
net::ScopedCERTCertificate cert;
// Import testing key pair and certificate.

@ -119,7 +119,7 @@ const char kSigninScreenExtension2UpdateManifestPath[] =
// Allows waiting until the list of policy-pushed web-trusted certificates
// changes.
class WebTrustedCertsChangedObserver
: public chromeos::PolicyCertificateProvider::Observer {
: public ash::PolicyCertificateProvider::Observer {
public:
WebTrustedCertsChangedObserver() = default;
@ -128,7 +128,7 @@ class WebTrustedCertsChangedObserver
WebTrustedCertsChangedObserver& operator=(
const WebTrustedCertsChangedObserver&) = delete;
// chromeos::PolicyCertificateProvider::Observer
// ash::PolicyCertificateProvider::Observer
void OnPolicyProvidedCertsChanged() override { run_loop_.Quit(); }
void Wait() { run_loop_.Run(); }

@ -10,8 +10,6 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/ash/smb_client/discovery/netbios_client_interface.h"
// TODO(https://crbug.com/1164001): remove and use forward declaration.
#include "chromeos/ash/components/network/firewall_hole.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
@ -28,6 +26,9 @@ class NetworkContext;
} // namespace network
namespace ash {
class FirewallHole;
namespace smb_client {
// NetBiosClient handles a NetBios Name Query Request.

@ -108,7 +108,7 @@ TetherService::TetherService(
notification_presenter_(
std::make_unique<chromeos::tether::TetherNotificationPresenter>(
profile_,
chromeos::NetworkConnect::Get())),
NetworkConnect::Get())),
gms_core_notifications_state_tracker_(
std::make_unique<GmsCoreNotificationsStateTrackerImpl>()),
tether_host_fetcher_(
@ -156,7 +156,7 @@ void TetherService::StartTetherIfPossible() {
gms_core_notifications_state_tracker_.get(), profile_->GetPrefs(),
network_state_handler_,
chromeos::NetworkHandler::Get()->managed_network_configuration_handler(),
chromeos::NetworkConnect::Get(),
NetworkConnect::Get(),
chromeos::NetworkHandler::Get()->network_connection_handler(), adapter_,
session_manager_);
}

@ -155,7 +155,7 @@ class TestTetherComponentFactory final : public TetherComponentImpl::Factory {
PrefService* pref_service,
chromeos::NetworkStateHandler* network_state_handler,
ManagedNetworkConfigurationHandler* managed_network_configuration_handler,
chromeos::NetworkConnect* network_connect,
NetworkConnect* network_connect,
NetworkConnectionHandler* network_connection_handler,
scoped_refptr<device::BluetoothAdapter> adapter,
session_manager::SessionManager* session_manager) override {
@ -297,7 +297,7 @@ class TetherServiceTest : public testing::Test {
fake_notification_presenter_ = nullptr;
mock_timer_ = nullptr;
chromeos::NetworkConnect::Initialize(nullptr);
NetworkConnect::Initialize(nullptr);
TestingProfile::Builder builder;
profile_ = builder.Build();
@ -391,7 +391,7 @@ class TetherServiceTest : public testing::Test {
shutdown_reason_verified_);
chromeos::PowerManagerClient::Shutdown();
chromeos::NetworkConnect::Shutdown();
NetworkConnect::Shutdown();
}
void SetPrimaryUserLoggedIn() {

@ -304,7 +304,7 @@ class CertsSourcePlatformNSS : public CertificateManagerModel::CertsSource,
#if BUILDFLAG(IS_CHROMEOS)
// Provides certificates installed through enterprise policy.
class CertsSourcePolicy : public CertificateManagerModel::CertsSource,
chromeos::PolicyCertificateProvider::Observer {
ash::PolicyCertificateProvider::Observer {
public:
// Defines which policy-provided certificates this CertsSourcePolicy instance
// should yield.
@ -318,7 +318,7 @@ class CertsSourcePolicy : public CertificateManagerModel::CertsSource,
};
CertsSourcePolicy(base::RepeatingClosure certs_source_updated_callback,
chromeos::PolicyCertificateProvider* policy_certs_provider,
ash::PolicyCertificateProvider* policy_certs_provider,
Mode mode)
: CertsSource(certs_source_updated_callback),
policy_certs_provider_(policy_certs_provider),
@ -333,7 +333,7 @@ class CertsSourcePolicy : public CertificateManagerModel::CertsSource,
policy_certs_provider_->RemovePolicyProvidedCertsObserver(this);
}
// chromeos::PolicyCertificateProvider::Observer
// ash::PolicyCertificateProvider::Observer
void OnPolicyProvidedCertsChanged() override {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
Refresh();
@ -400,7 +400,7 @@ class CertsSourcePolicy : public CertificateManagerModel::CertsSource,
SetCertInfos(std::move(cert_infos));
}
raw_ptr<chromeos::PolicyCertificateProvider> policy_certs_provider_;
raw_ptr<ash::PolicyCertificateProvider> policy_certs_provider_;
Mode mode_;
};

@ -24,10 +24,13 @@ class BrowserContext;
} // namespace content
#if BUILDFLAG(IS_CHROMEOS)
namespace ash {
class PolicyCertificateProvider;
}
namespace chromeos {
class CertificateProvider;
class PolicyCertificateProvider;
} // namespace chromeos
}
#endif
// CertificateManagerModel provides the data to be displayed in the certificate
@ -126,8 +129,7 @@ class CertificateManagerModel {
struct Params {
#if BUILDFLAG(IS_CHROMEOS)
// May be nullptr.
raw_ptr<chromeos::PolicyCertificateProvider> policy_certs_provider =
nullptr;
raw_ptr<ash::PolicyCertificateProvider> policy_certs_provider = nullptr;
// May be nullptr.
std::unique_ptr<chromeos::CertificateProvider>
extension_certificate_provider;

@ -207,8 +207,7 @@ TEST_F(CertificateManagerModelTest, ListsClientCertsFromPlatform) {
#if BUILDFLAG(IS_CHROMEOS)
namespace {
class FakePolicyCertificateProvider
: public chromeos::PolicyCertificateProvider {
class FakePolicyCertificateProvider : public ash::PolicyCertificateProvider {
public:
void AddPolicyProvidedCertsObserver(Observer* observer) override {
observer_list_.AddObserver(observer);

@ -17,7 +17,7 @@ NetworkingPrivateUIDelegateChromeOS::~NetworkingPrivateUIDelegateChromeOS() {}
void NetworkingPrivateUIDelegateChromeOS::ShowAccountDetails(
const std::string& guid) const {
chromeos::NetworkConnect::Get()->ShowCarrierAccountDetail(guid);
ash::NetworkConnect::Get()->ShowCarrierAccountDetail(guid);
}
} // namespace extensions

@ -7,7 +7,7 @@
#include "chromeos/ash/components/network/firewall_hole.h"
NearbyConnectionsFirewallHole::NearbyConnectionsFirewallHole(
std::unique_ptr<chromeos::FirewallHole> firewall_hole)
std::unique_ptr<ash::FirewallHole> firewall_hole)
: firewall_hole_(std::move(firewall_hole)) {}
NearbyConnectionsFirewallHole::~NearbyConnectionsFirewallHole() = default;

@ -9,24 +9,24 @@
#include "ash/services/nearby/public/mojom/firewall_hole.mojom.h"
namespace chromeos {
namespace ash {
class FirewallHole;
} // namespace chromeos
}
// An implementation of the mojo interface representing a firewall hole for
// Nearby Connections WifiLan TCP sockets. This implementation is essentially a
// wrapper around a chromeos::FirewallHole.
// wrapper around a ash::FirewallHole.
class NearbyConnectionsFirewallHole : public sharing::mojom::FirewallHole {
public:
explicit NearbyConnectionsFirewallHole(
std::unique_ptr<chromeos::FirewallHole> firewall_hole);
std::unique_ptr<ash::FirewallHole> firewall_hole);
NearbyConnectionsFirewallHole(const NearbyConnectionsFirewallHole&) = delete;
NearbyConnectionsFirewallHole& operator=(
const NearbyConnectionsFirewallHole&) = delete;
~NearbyConnectionsFirewallHole() override;
private:
std::unique_ptr<chromeos::FirewallHole> firewall_hole_;
std::unique_ptr<ash::FirewallHole> firewall_hole_;
};
#endif // CHROME_BROWSER_NEARBY_SHARING_FIREWALL_HOLE_NEARBY_CONNECTIONS_FIREWALL_HOLE_H_

@ -23,8 +23,8 @@ NearbyConnectionsFirewallHoleFactory::~NearbyConnectionsFirewallHoleFactory() =
void NearbyConnectionsFirewallHoleFactory::OpenFirewallHole(
const ash::nearby::TcpServerSocketPort& port,
OpenFirewallHoleCallback callback) {
chromeos::FirewallHole::Open(
chromeos::FirewallHole::PortType::TCP, port.port(),
ash::FirewallHole::Open(
ash::FirewallHole::PortType::TCP, port.port(),
/*interface=*/std::string(),
base::BindOnce(
&NearbyConnectionsFirewallHoleFactory::OnFirewallHoleOpened,
@ -34,7 +34,7 @@ void NearbyConnectionsFirewallHoleFactory::OpenFirewallHole(
void NearbyConnectionsFirewallHoleFactory::OnFirewallHoleOpened(
const ash::nearby::TcpServerSocketPort& port,
OpenFirewallHoleCallback callback,
std::unique_ptr<chromeos::FirewallHole> firewall_hole) {
std::unique_ptr<ash::FirewallHole> firewall_hole) {
if (!firewall_hole) {
LOG(ERROR) << "NearbyConnectionsFirewallHoleFactory::" << __func__
<< ": Failed to open TCP firewall hole on port " << port.port();

@ -12,18 +12,15 @@
#include "mojo/public/cpp/bindings/unique_receiver_set.h"
namespace ash {
class FirewallHole;
namespace nearby {
class TcpServerSocketPort;
} // namespace nearby
} // namespace ash
namespace chromeos {
class FirewallHole;
} // namespace chromeos
// An implementation of the mojo service used to open firewall holes for Nearby
// Connections WifiLan TCP sockets. This implementation is essentially a wrapper
// around chromeos::FirewallHole::Open(). The lifetime of a firewall hole
// around ash::FirewallHole::Open(). The lifetime of a firewall hole
// mirrors the lifetime of the mojo remote provided by OpenFirewallHole(); the
// corresponding mojo receivers are owned by |firewall_hole_receivers_|.
class NearbyConnectionsFirewallHoleFactory
@ -40,10 +37,9 @@ class NearbyConnectionsFirewallHoleFactory
OpenFirewallHoleCallback callback) override;
private:
void OnFirewallHoleOpened(
const ash::nearby::TcpServerSocketPort& port,
OpenFirewallHoleCallback callback,
std::unique_ptr<chromeos::FirewallHole> firewall_hole);
void OnFirewallHoleOpened(const ash::nearby::TcpServerSocketPort& port,
OpenFirewallHoleCallback callback,
std::unique_ptr<ash::FirewallHole> firewall_hole);
mojo::UniqueReceiverSet<sharing::mojom::FirewallHole>
firewall_hole_receivers_;

@ -46,7 +46,7 @@ ProxyServiceFactory::CreateProxyConfigService(PrefProxyConfigTracker* tracker,
std::make_unique<chromeos::ProxyConfigServiceLacros>(profile);
}
#elif !BUILDFLAG(IS_CHROMEOS_ASH)
// On Ash-Chrome, base service is NULL; chromeos::ProxyConfigServiceImpl
// On Ash-Chrome, base service is NULL; ash::ProxyConfigServiceImpl
// determines the effective proxy config to take effect in the network layer,
// be it from prefs or system (which is network shill on chromeos).
@ -67,7 +67,7 @@ ProxyServiceFactory::CreatePrefProxyConfigTrackerOfProfile(
PrefService* profile_prefs,
PrefService* local_state_prefs) {
#if BUILDFLAG(IS_CHROMEOS_ASH)
return std::make_unique<chromeos::ProxyConfigServiceImpl>(
return std::make_unique<ash::ProxyConfigServiceImpl>(
profile_prefs, local_state_prefs, nullptr);
#else
return std::make_unique<PrefProxyConfigTrackerImpl>(profile_prefs, nullptr);
@ -79,7 +79,7 @@ std::unique_ptr<PrefProxyConfigTracker>
ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
PrefService* local_state_prefs) {
#if BUILDFLAG(IS_CHROMEOS_ASH)
return std::make_unique<chromeos::ProxyConfigServiceImpl>(
return std::make_unique<ash::ProxyConfigServiceImpl>(
nullptr, local_state_prefs, nullptr);
#else
return std::make_unique<PrefProxyConfigTrackerImpl>(local_state_prefs,

@ -81,12 +81,12 @@ void NetworkConfigurationUpdater::OnPolicyServiceInitialized(
}
void NetworkConfigurationUpdater::AddPolicyProvidedCertsObserver(
chromeos::PolicyCertificateProvider::Observer* observer) {
ash::PolicyCertificateProvider::Observer* observer) {
observer_list_.AddObserver(observer);
}
void NetworkConfigurationUpdater::RemovePolicyProvidedCertsObserver(
chromeos::PolicyCertificateProvider::Observer* observer) {
ash::PolicyCertificateProvider::Observer* observer) {
observer_list_.RemoveObserver(observer);
}

@ -34,7 +34,7 @@ class PolicyMap;
// (that will be propagated to the network service). Provides entry points for
// handling client certificates and network configurations in subclasses.
// Does not handle proxy settings.
class NetworkConfigurationUpdater : public chromeos::PolicyCertificateProvider,
class NetworkConfigurationUpdater : public ash::PolicyCertificateProvider,
public PolicyService::Observer {
public:
NetworkConfigurationUpdater(const NetworkConfigurationUpdater&) = delete;
@ -51,11 +51,11 @@ class NetworkConfigurationUpdater : public chromeos::PolicyCertificateProvider,
// The observer interface sends notifications about changes in server and
// authority certificates.
// chromeos::PolicyCertificateProvider:
// ash::PolicyCertificateProvider:
void AddPolicyProvidedCertsObserver(
chromeos::PolicyCertificateProvider::Observer* observer) override;
ash::PolicyCertificateProvider::Observer* observer) override;
void RemovePolicyProvidedCertsObserver(
chromeos::PolicyCertificateProvider::Observer* observer) override;
ash::PolicyCertificateProvider::Observer* observer) override;
net::CertificateList GetAllServerAndAuthorityCertificates(
const chromeos::onc::CertificateScope& scope) const override;
net::CertificateList GetAllAuthorityCertificates(
@ -149,8 +149,8 @@ class NetworkConfigurationUpdater : public chromeos::PolicyCertificateProvider,
// Observer list for notifying about ONC-provided server and CA certificate
// changes.
base::ObserverList<chromeos::PolicyCertificateProvider::Observer,
true>::Unchecked observer_list_;
base::ObserverList<ash::PolicyCertificateProvider::Observer, true>::Unchecked
observer_list_;
};
} // namespace policy

@ -88,7 +88,7 @@ class FakeUser : public user_manager::User {
};
class MockPolicyProvidedCertsObserver
: public chromeos::PolicyCertificateProvider::Observer {
: public ash::PolicyCertificateProvider::Observer {
public:
MockPolicyProvidedCertsObserver() = default;

@ -37,7 +37,7 @@ namespace policy {
namespace {
class MockPolicyProvidedCertsObserver
: public chromeos::PolicyCertificateProvider::Observer {
: public ash::PolicyCertificateProvider::Observer {
public:
MockPolicyProvidedCertsObserver() = default;

@ -36,7 +36,7 @@ PolicyCertService::~PolicyCertService() {
PolicyCertService::PolicyCertService(
Profile* profile,
chromeos::PolicyCertificateProvider* policy_certificate_provider,
ash::PolicyCertificateProvider* policy_certificate_provider,
bool may_use_profile_wide_trust_anchors)
: profile_(profile),
policy_certificate_provider_(policy_certificate_provider),

@ -38,17 +38,16 @@ namespace policy {
// This service / its factory keep track of which Profile has used a
// policy-provided trust anchor.
class PolicyCertService : public KeyedService,
public chromeos::PolicyCertificateProvider::Observer {
public ash::PolicyCertificateProvider::Observer {
public:
// Constructs a PolicyCertService for |profile| using
// |policy_certificate_provider| as the source of certificates.
// If |may_use_profile_wide_trust_anchors| is true, certificates from
// |policy_certificate_provider| that have requested "Web" trust and have
// profile-wide scope will be used for |profile|.
PolicyCertService(
Profile* profile,
chromeos::PolicyCertificateProvider* policy_certificate_provider,
bool may_use_profile_wide_trust_anchors);
PolicyCertService(Profile* profile,
ash::PolicyCertificateProvider* policy_certificate_provider,
bool may_use_profile_wide_trust_anchors);
PolicyCertService(const PolicyCertService&) = delete;
PolicyCertService& operator=(const PolicyCertService&) = delete;
@ -104,8 +103,7 @@ class PolicyCertService : public KeyedService,
const raw_ptr<Profile> profile_;
// The source of certificates for this PolicyCertService.
const raw_ptr<chromeos::PolicyCertificateProvider>
policy_certificate_provider_;
const raw_ptr<ash::PolicyCertificateProvider> policy_certificate_provider_;
// If true, CA certificates |policy_certificate_provider_| that have requested
// "Web" trust and have profile-wide scope may be used for |profile_|.

@ -33,8 +33,7 @@ namespace {
// Returns the PolicyCertificateProvider that should be used for |profile|.
// May return nullptr, which should be treated as no policy-provided
// certificates set.
chromeos::PolicyCertificateProvider* GetPolicyCertificateProvider(
Profile* profile) {
ash::PolicyCertificateProvider* GetPolicyCertificateProvider(Profile* profile) {
if (ash::ProfileHelper::Get()->IsSigninProfile(profile)) {
return g_browser_process->platform_part()
->browser_policy_connector_ash()
@ -47,7 +46,7 @@ chromeos::PolicyCertificateProvider* GetPolicyCertificateProvider(
KeyedService* BuildServiceInstanceAsh(content::BrowserContext* context) {
Profile* profile = Profile::FromBrowserContext(context);
chromeos::PolicyCertificateProvider* policy_certificate_provider =
ash::PolicyCertificateProvider* policy_certificate_provider =
GetPolicyCertificateProvider(profile);
if (!policy_certificate_provider)
return nullptr;
@ -87,7 +86,7 @@ KeyedService* BuildServiceInstanceAsh(content::BrowserContext* context) {
KeyedService* BuildServiceInstanceLacros(content::BrowserContext* context) {
Profile* profile = Profile::FromBrowserContext(context);
chromeos::PolicyCertificateProvider* policy_certificate_provider =
ash::PolicyCertificateProvider* policy_certificate_provider =
UserNetworkConfigurationUpdaterFactory::GetForBrowserContext(profile);
if (!policy_certificate_provider)
return nullptr;

@ -49,9 +49,8 @@ void GetNssCertDatabaseOnIOThread(
UserNetworkConfigurationUpdaterAsh::~UserNetworkConfigurationUpdaterAsh() {
// NetworkCertLoader may be not initialized in tests.
if (chromeos::NetworkCertLoader::IsInitialized()) {
chromeos::NetworkCertLoader::Get()->SetUserPolicyCertificateProvider(
nullptr);
if (ash::NetworkCertLoader::IsInitialized()) {
ash::NetworkCertLoader::Get()->SetUserPolicyCertificateProvider(nullptr);
}
}
@ -126,8 +125,8 @@ UserNetworkConfigurationUpdaterAsh::UserNetworkConfigurationUpdaterAsh(
// primary profile. This assumes that a |UserNetworkConfigurationUpdaterAsh|
// is only created for the primary profile. NetworkCertLoader may be not
// initialized in tests.
if (chromeos::NetworkCertLoader::IsInitialized())
chromeos::NetworkCertLoader::Get()->SetUserPolicyCertificateProvider(this);
if (ash::NetworkCertLoader::IsInitialized())
ash::NetworkCertLoader::Get()->SetUserPolicyCertificateProvider(this);
// Set profile-wide expansions for policy networks (i.e. those that apply to
// all networks in this profile). Note that this does currently not apply

@ -79,7 +79,7 @@ constexpr char kRootCaCert[] = "root_ca_cert.pem";
// Allows waiting until the list of policy-pushed web-trusted certificates
// changes.
class WebTrustedCertsChangedObserver
: public chromeos::PolicyCertificateProvider::Observer {
: public ash::PolicyCertificateProvider::Observer {
public:
WebTrustedCertsChangedObserver() = default;
@ -88,7 +88,7 @@ class WebTrustedCertsChangedObserver
WebTrustedCertsChangedObserver& operator=(
const WebTrustedCertsChangedObserver&) = delete;
// chromeos::PolicyCertificateProvider::Observer
// ash::PolicyCertificateProvider::Observer
void OnPolicyProvidedCertsChanged() override { run_loop_.Quit(); }
void Wait() { run_loop_.Run(); }
@ -98,11 +98,10 @@ class WebTrustedCertsChangedObserver
};
// Allows waiting until |NetworkCertLoader| updates its list of certificates.
class NetworkCertLoaderTestObserver
: public chromeos::NetworkCertLoader::Observer {
class NetworkCertLoaderTestObserver : public ash::NetworkCertLoader::Observer {
public:
explicit NetworkCertLoaderTestObserver(
chromeos::NetworkCertLoader* network_cert_loader)
ash::NetworkCertLoader* network_cert_loader)
: network_cert_loader_(network_cert_loader) {
network_cert_loader_->AddObserver(this);
}
@ -115,13 +114,13 @@ class NetworkCertLoaderTestObserver
network_cert_loader_->RemoveObserver(this);
}
// chromeos::NetworkCertLoader::Observer
// ash::NetworkCertLoader::Observer
void OnCertificatesLoaded() override { run_loop_.Quit(); }
void Wait() { run_loop_.Run(); }
private:
raw_ptr<chromeos::NetworkCertLoader> network_cert_loader_;
raw_ptr<ash::NetworkCertLoader> network_cert_loader_;
base::RunLoop run_loop_;
};
@ -540,7 +539,7 @@ IN_PROC_BROWSER_TEST_F(PolicyProvidedCertsRegularUserTest,
bool IsCertInCertificateList(
const net::X509Certificate* cert,
const chromeos::NetworkCertLoader::NetworkCertList& network_cert_list) {
const ash::NetworkCertLoader::NetworkCertList& network_cert_list) {
for (const auto& network_cert : network_cert_list) {
if (net::x509_util::IsSameCertificate(network_cert.cert(), cert))
return true;
@ -554,14 +553,14 @@ IN_PROC_BROWSER_TEST_F(PolicyProvidedCertsRegularUserTest,
// properly initialized because |UserSessionManager| only sets the primary
// user's NSS Database in |NetworkCertLoader| if running on ChromeOS according
// to |base::SysInfo|.
ASSERT_TRUE(chromeos::NetworkCertLoader::IsInitialized());
chromeos::NetworkCertLoader::Get()->SetUserNSSDB(test_nss_cert_db_.get());
ASSERT_TRUE(ash::NetworkCertLoader::IsInitialized());
ash::NetworkCertLoader::Get()->SetUserNSSDB(test_nss_cert_db_.get());
EXPECT_FALSE(IsCertInCertificateList(
user_policy_certs_helper_.root_cert().get(),
chromeos::NetworkCertLoader::Get()->authority_certs()));
ash::NetworkCertLoader::Get()->authority_certs()));
NetworkCertLoaderTestObserver network_cert_loader_observer(
chromeos::NetworkCertLoader::Get());
ash::NetworkCertLoader::Get());
user_policy_certs_helper_.SetRootCertONCUserPolicy(
multi_profile_policy_helper_.profile_1(),
multi_profile_policy_helper_.policy_for_profile_1());
@ -572,7 +571,7 @@ IN_PROC_BROWSER_TEST_F(PolicyProvidedCertsRegularUserTest,
// set a policy with a certificate requesting Web Trust here).
EXPECT_TRUE(IsCertInCertificateList(
user_policy_certs_helper_.root_cert().get(),
chromeos::NetworkCertLoader::Get()->authority_certs()));
ash::NetworkCertLoader::Get()->authority_certs()));
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)

@ -141,7 +141,7 @@ void ChromeBrowserMainExtraPartsAsh::PreProfileInit() {
// NetworkConnect handles the network connection state machine for the UI.
network_connect_delegate_ =
std::make_unique<NetworkConnectDelegateChromeOS>();
chromeos::NetworkConnect::Initialize(network_connect_delegate_.get());
ash::NetworkConnect::Initialize(network_connect_delegate_.get());
cast_config_controller_media_router_ =
std::make_unique<CastConfigControllerMediaRouter>();
@ -367,8 +367,8 @@ void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
ambient_client_.reset();
cast_config_controller_media_router_.reset();
if (chromeos::NetworkConnect::IsInitialized())
chromeos::NetworkConnect::Shutdown();
if (ash::NetworkConnect::IsInitialized())
ash::NetworkConnect::Shutdown();
network_connect_delegate_.reset();
user_profile_loaded_observer_.reset();
}

@ -41,7 +41,7 @@ const char kCellularGuid[] = "cellular1_guid";
const char kNotificationId[] = "chrome://settings/internet/mobile_data";
const char kTestUserName[] = "test-user@example.com";
class NetworkConnectTestDelegate : public chromeos::NetworkConnect::Delegate {
class NetworkConnectTestDelegate : public ash::NetworkConnect::Delegate {
public:
NetworkConnectTestDelegate() {}
@ -82,13 +82,13 @@ class MobileDataNotificationsTest : public testing::Test {
SetupNetworkShillState();
base::RunLoop().RunUntilIdle();
network_connect_delegate_ = std::make_unique<NetworkConnectTestDelegate>();
chromeos::NetworkConnect::Initialize(network_connect_delegate_.get());
ash::NetworkConnect::Initialize(network_connect_delegate_.get());
mobile_data_notifications_ = std::make_unique<MobileDataNotifications>();
}
void TearDown() override {
mobile_data_notifications_.reset();
chromeos::NetworkConnect::Shutdown();
ash::NetworkConnect::Shutdown();
network_connect_delegate_.reset();
profile_manager_.reset();
user_manager_enabler_.reset();
@ -180,7 +180,7 @@ TEST_F(MobileDataNotificationsTest, SimpleSetup) {
TEST_F(MobileDataNotificationsTest, NotificationAlreadyShown) {
pref_service()->SetBoolean(prefs::kShowMobileDataNotification, false);
chromeos::NetworkConnect::Get()->ConnectToNetworkId(kCellularGuid);
ash::NetworkConnect::Get()->ConnectToNetworkId(kCellularGuid);
// Wait for async ConnectToNetworkId to take effect.
base::RunLoop().RunUntilIdle();
@ -191,7 +191,7 @@ TEST_F(MobileDataNotificationsTest, NotificationAlreadyShown) {
TEST_F(MobileDataNotificationsTest, DisplayNotification) {
pref_service()->SetBoolean(prefs::kShowMobileDataNotification, true);
chromeos::NetworkConnect::Get()->ConnectToNetworkId(kCellularGuid);
ash::NetworkConnect::Get()->ConnectToNetworkId(kCellularGuid);
// Wait for async ConnectToNetworkId to take effect.
base::RunLoop().RunUntilIdle();
@ -202,7 +202,7 @@ TEST_F(MobileDataNotificationsTest, DisplayNotification) {
TEST_F(MobileDataNotificationsTest, TogglesPref) {
pref_service()->SetBoolean(prefs::kShowMobileDataNotification, true);
chromeos::NetworkConnect::Get()->ConnectToNetworkId(kCellularGuid);
ash::NetworkConnect::Get()->ConnectToNetworkId(kCellularGuid);
// Wait for async ConnectToNetworkId to take effect.
base::RunLoop().RunUntilIdle();
@ -213,7 +213,7 @@ TEST_F(MobileDataNotificationsTest, TogglesPref) {
// connected.
TEST_F(MobileDataNotificationsTest, SessionUpdateDisplayNotification) {
// Set up cellular network, don't trigger notification.
chromeos::NetworkConnect::Get()->ConnectToNetworkId(kCellularGuid);
ash::NetworkConnect::Get()->ConnectToNetworkId(kCellularGuid);
pref_service()->SetBoolean(prefs::kShowMobileDataNotification, false);
// Process network observer update.
base::RunLoop().RunUntilIdle();

@ -18,8 +18,7 @@ namespace chromeos {
class NetworkStateNotifier;
}
class NetworkConnectDelegateChromeOS
: public chromeos::NetworkConnect::Delegate {
class NetworkConnectDelegateChromeOS : public ash::NetworkConnect::Delegate {
public:
NetworkConnectDelegateChromeOS();

@ -642,7 +642,7 @@ void NetworkStateNotifier::ShowSimUnlockSettings() {
void NetworkStateNotifier::ShowCarrierAccountDetail(
const std::string& network_id) {
NetworkConnect::Get()->ShowCarrierAccountDetail(network_id);
ash::NetworkConnect::Get()->ShowCarrierAccountDetail(network_id);
}
} // namespace chromeos

@ -120,7 +120,7 @@ constexpr const char* const
TetherNotificationPresenter::TetherNotificationPresenter(
Profile* profile,
NetworkConnect* network_connect)
ash::NetworkConnect* network_connect)
: profile_(profile),
network_connect_(network_connect),
settings_ui_delegate_(base::WrapUnique(new SettingsUiDelegateImpl())) {}

@ -18,15 +18,15 @@
class Profile;
namespace ash {
class NetworkConnect;
}
namespace message_center {
class Notification;
} // namespace message_center
namespace chromeos {
class NetworkConnect;
namespace tether {
namespace chromeos::tether {
// Produces notifications associated with CrOS tether network events and alerts
// observers about interactions with those notifications.
@ -35,7 +35,7 @@ class TetherNotificationPresenter : public NotificationPresenter {
// Caller must ensure that |profile| and |network_connect| outlive this
// instance.
TetherNotificationPresenter(Profile* profile,
NetworkConnect* network_connect);
ash::NetworkConnect* network_connect);
TetherNotificationPresenter(const TetherNotificationPresenter&) = delete;
TetherNotificationPresenter& operator=(const TetherNotificationPresenter&) =
@ -111,7 +111,7 @@ class TetherNotificationPresenter : public NotificationPresenter {
void RemoveNotificationIfVisible(const std::string& notification_id);
Profile* profile_;
NetworkConnect* network_connect_;
ash::NetworkConnect* network_connect_;
// The ID of the currently showing notification.
std::string showing_notification_id_;
@ -125,8 +125,6 @@ class TetherNotificationPresenter : public NotificationPresenter {
base::WeakPtrFactory<TetherNotificationPresenter> weak_ptr_factory_{this};
};
} // namespace tether
} // namespace chromeos
} // namespace chromeos::tether
#endif // CHROME_BROWSER_UI_ASH_NETWORK_TETHER_NOTIFICATION_PRESENTER_H_

@ -7,7 +7,7 @@
#include "base/strings/utf_string_conversions.h"
#include "dbus/object_path.h"
namespace chromeos {
namespace ash {
namespace {
// Keys used by ToDictionaryValue() and FromDictionaryValue().
@ -116,4 +116,4 @@ bool CellularESimProfile::operator!=(const CellularESimProfile& other) const {
return !(*this == other);
}
} // namespace chromeos
} // namespace ash

@ -12,7 +12,7 @@
#include "dbus/object_path.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
namespace chromeos {
namespace ash {
// Metadata representing an eSIM profile.
class COMPONENT_EXPORT(CHROMEOS_NETWORK) CellularESimProfile {
@ -92,11 +92,6 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) CellularESimProfile {
std::string activation_code_;
};
} // namespace chromeos
// TODO(https://crbug.com/1164001): remove after the migration is finished.
namespace ash {
using ::chromeos::CellularESimProfile;
}
} // namespace ash
#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_CELLULAR_ESIM_PROFILE_H_

@ -10,7 +10,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
namespace chromeos {
namespace ash {
TEST(CellularESimProfileTest, ConvertToAndFromDictionary) {
CellularESimProfile profile(CellularESimProfile::State::kPending,
@ -48,4 +48,4 @@ TEST(CellularESimProfileTest, InvalidDictionary) {
EXPECT_FALSE(from_dictionary);
}
} // namespace chromeos
} // namespace ash

@ -8,8 +8,6 @@
#include <vector>
#include "base/component_export.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/cellular_esim_profile.h"
#include "chromeos/ash/components/network/device_state.h"
namespace dbus {
@ -18,6 +16,8 @@ class ObjectPath;
namespace ash {
class CellularESimProfile;
// Generates a list of CellularESimProfile objects for all Hermes esim profile
// objects available through its dbus clients. Note that this function returns
// an empty array if CellularESimProfileHandler::RefreshProfileList has not

@ -16,8 +16,7 @@
#include "net/cert/nss_cert_database_chromeos.h"
#include "net/cert/x509_util_nss.h"
namespace chromeos {
namespace certificate {
namespace ash::certificate {
namespace {
@ -93,5 +92,4 @@ std::string GetCertAsciiNameOrNickname(CERTCertificate* cert_handle) {
return Stringize(CERT_GetCommonName(&cert_handle->subject), alternative_text);
}
} // namespace certificate
} // namespace chromeos
} // namespace ash::certificate

@ -11,8 +11,7 @@
#include "base/component_export.h"
#include "net/cert/cert_type.h"
namespace chromeos {
namespace certificate {
namespace ash::certificate {
// Selected functions from chrome/common/net/x509_certificate_model.cc
@ -50,12 +49,6 @@ std::string GetCertAsciiSubjectCommonName(CERTCertificate* cert_handle);
COMPONENT_EXPORT(CHROMEOS_NETWORK)
std::string GetCertAsciiNameOrNickname(CERTCertificate* cert_handle);
} // namespace certificate
} // namespace chromeos
// TODO(https://crbug.com/1164001): remove when it moved to ash.
namespace ash {
namespace certificate = ::chromeos::certificate;
}
} // namespace ash::certificate
#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_CERTIFICATE_HELPER_H_

@ -11,7 +11,7 @@
#include "net/test/test_with_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace chromeos {
namespace ash {
// Required to register an observer from the constructor of
// net::NSSCertDatabase.
@ -89,4 +89,4 @@ TEST_F(CertificateHelperTest, GetTypeServer) {
EXPECT_EQ(net::SERVER_CERT, certificate::GetCertType(cert.get()));
}
} // namespace chromeos
} // namespace ash

@ -17,7 +17,7 @@
#include "base/threading/thread_task_runner_handle.h"
#include "chromeos/dbus/permission_broker/permission_broker_client.h"
namespace chromeos {
namespace ash {
namespace {
@ -121,4 +121,4 @@ FirewallHole::FirewallHole(PortType type,
interface_(interface),
lifeline_fd_(std::move(lifeline_fd)) {}
} // namespace chromeos
} // namespace ash

@ -14,7 +14,7 @@
#include "base/component_export.h"
#include "base/files/scoped_file.h"
namespace chromeos {
namespace ash {
// This class works with the Chrome OS permission broker to open a port in the
// system firewall. It is closed on destruction.
@ -58,11 +58,6 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) FirewallHole {
base::ScopedFD lifeline_fd_;
};
} // namespace chromeos
// TODO(https://crbug.com/1164001): remove when moved to ash.
namespace ash {
using ::chromeos::FirewallHole;
} // namespace ash
#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_FIREWALL_HOLE_H_

@ -14,9 +14,11 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace chromeos {
namespace ash {
namespace {
using ::chromeos::FakePermissionBrokerClient;
void CopyFirewallHole(base::RunLoop* run_loop,
std::unique_ptr<FirewallHole>* out_hole,
std::unique_ptr<FirewallHole> hole) {
@ -86,4 +88,4 @@ TEST_F(FirewallHoleTest, DenyUdpPortAccess) {
}
} // namespace
} // namespace chromeos
} // namespace ash

@ -14,8 +14,6 @@
#include "chromeos/ash/components/network/client_cert_util.h"
#include "chromeos/ash/components/network/network_handler.h"
#include "chromeos/ash/components/network/network_handler_callbacks.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_profile.h"
#include "components/onc/onc_constants.h"
namespace base {
@ -27,6 +25,7 @@ namespace ash {
class NetworkConfigurationHandler;
class NetworkDeviceHandler;
class NetworkPolicyObserver;
struct NetworkProfile;
class NetworkProfileHandler;
class NetworkStateHandler;

@ -17,8 +17,6 @@
#include "chromeos/ash/components/network/client_cert_util.h"
#include "chromeos/ash/components/network/managed_network_configuration_handler.h"
#include "chromeos/ash/components/network/network_handler_callbacks.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_profile.h"
#include "chromeos/ash/components/network/network_profile_observer.h"
#include "chromeos/ash/components/network/policy_applicator.h"
#include "chromeos/ash/components/network/profile_policies.h"
@ -32,6 +30,7 @@ namespace ash {
class CellularPolicyHandler;
class ManagedCellularPrefHandler;
class NetworkConfigurationHandler;
struct NetworkProfile;
class NetworkProfileHandler;
class NetworkStateHandler;

@ -28,7 +28,7 @@
#include "net/cert/nss_cert_database_chromeos.h"
#include "net/cert/x509_util_nss.h"
namespace chromeos {
namespace ash {
namespace {
@ -591,4 +591,4 @@ void NetworkCertLoader::OnPolicyProvidedCertsChanged() {
UpdateCertificates();
}
} // namespace chromeos
} // namespace ash

@ -22,7 +22,7 @@ namespace net {
class NSSCertDatabase;
}
namespace chromeos {
namespace ash {
// This class is responsible for loading certificates once the TPM is
// initialized. It is expected to be constructed on the UI thread and public
@ -276,12 +276,11 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) NetworkCertLoader
base::WeakPtrFactory<NetworkCertLoader> weak_factory_{this};
};
} // namespace chromeos
} // namespace ash
// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
// source migration is finished.
namespace ash {
using ::chromeos::NetworkCertLoader;
// TODO(https://crbug.com/1164001): remove when the migration is finished.
namespace chromeos {
using ::ash::NetworkCertLoader;
}
#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_NETWORK_CERT_LOADER_H_

@ -24,7 +24,7 @@
#include "net/test/test_data_directory.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace chromeos {
namespace ash {
namespace {
class FakePolicyCertificateProvider : public PolicyCertificateProvider {
@ -873,4 +873,4 @@ TEST_F(NetworkCertLoaderTest, NoUpdateWhenShuttingDown) {
ASSERT_EQ(0U, GetAndResetCertificatesLoadedEventsCount());
}
} // namespace chromeos
} // namespace ash

@ -25,7 +25,7 @@
#include "chromeos/login/login_state/login_state.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
namespace chromeos {
namespace ash {
namespace {
@ -554,4 +554,4 @@ NetworkConnect::NetworkConnect() = default;
NetworkConnect::~NetworkConnect() = default;
} // namespace chromeos
} // namespace ash

@ -8,14 +8,14 @@
#include <string>
#include "base/component_export.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_type_pattern.h"
namespace base {
class Value;
}
namespace chromeos {
namespace ash {
class NetworkTypePattern;
// NetworkConnect is a state machine designed to handle the complex UI flows
// associated with connecting to a network (and related tasks). Any showing
@ -81,9 +81,8 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) NetworkConnect {
// Enables or disables a network technology. If |technology| refers to
// cellular and the device cannot be enabled due to a SIM lock, this function
// will launch the SIM unlock dialog.
virtual void SetTechnologyEnabled(
const chromeos::NetworkTypePattern& technology,
bool enabled_state) = 0;
virtual void SetTechnologyEnabled(const NetworkTypePattern& technology,
bool enabled_state) = 0;
// Determines whether or not a network requires a connection to activate or
// setup and either shows a notification or opens the mobile setup dialog.
@ -115,11 +114,11 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) NetworkConnect {
NetworkConnect();
};
} // namespace chromeos
} // namespace ash
// TODO(https://crbug.com/1164001): remove when moved to ash
namespace ash {
using ::chromeos::NetworkConnect;
// TODO(https://crbug.com/1164001): remove when the migration is finished.
namespace chromeos {
using ::ash::NetworkConnect;
}
#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_NETWORK_CONNECT_H_

@ -29,7 +29,7 @@ using testing::AnyNumber;
using testing::NiceMock;
using testing::Return;
namespace chromeos {
namespace ash {
namespace {
@ -339,4 +339,4 @@ TEST_F(NetworkConnectTest, ConnectToCellularNetwork_SimLocked) {
base::RunLoop().RunUntilIdle();
}
} // namespace chromeos
} // namespace ash

@ -6,7 +6,7 @@
#include "base/notreached.h"
namespace chromeos {
namespace ash {
namespace {
#define ENUM_CASE(x) case x: return std::string(#x)
@ -50,4 +50,4 @@ std::string NetworkIPConfig::ToString() const {
+ " name_servers: " + name_servers;
}
} // namespace chromeos
} // namespace ash

@ -11,7 +11,7 @@
#include "base/callback.h"
#include "base/component_export.h"
namespace chromeos {
namespace ash {
// ipconfig types (see flimflam/files/doc/ipconfig-api.txt)
enum IPConfigType {
@ -44,6 +44,6 @@ struct COMPONENT_EXPORT(CHROMEOS_NETWORK) NetworkIPConfig {
typedef std::vector<NetworkIPConfig> NetworkIPConfigVector;
} // namespace chromeos
} // namespace ash
#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_NETWORK_IP_CONFIG_H_

@ -7,7 +7,7 @@
#include "base/notreached.h"
#include "base/strings/stringprintf.h"
namespace chromeos {
namespace ash {
std::string NetworkProfile::ToDebugString() const {
if (type() == NetworkProfile::TYPE_SHARED) {
@ -22,4 +22,4 @@ std::string NetworkProfile::ToDebugString() const {
return std::string();
}
} // namespace chromeos
} // namespace ash

@ -9,7 +9,7 @@
#include "base/component_export.h"
namespace chromeos {
namespace ash {
struct COMPONENT_EXPORT(CHROMEOS_NETWORK) NetworkProfile {
enum Type {
@ -33,11 +33,11 @@ struct COMPONENT_EXPORT(CHROMEOS_NETWORK) NetworkProfile {
std::string ToDebugString() const;
};
} // namespace chromeos
} // namespace ash
// TODO(https://crbug.com/1164001): remove when it moved to ash.
namespace ash {
using ::chromeos::NetworkProfile;
// TODO(https://crbug.com/1164001): remove when the migration is finished.
namespace chromeos {
using ::ash::NetworkProfile;
}
#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_NETWORK_PROFILE_H_

@ -5,11 +5,10 @@
#ifndef CHROMEOS_ASH_COMPONENTS_NETWORK_NETWORK_PROFILE_OBSERVER_H_
#define CHROMEOS_ASH_COMPONENTS_NETWORK_NETWORK_PROFILE_OBSERVER_H_
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_profile.h"
namespace ash {
struct NetworkProfile;
class NetworkProfileObserver {
public:
NetworkProfileObserver& operator=(const NetworkProfileObserver&) = delete;

@ -11,7 +11,7 @@
#include "base/memory/ptr_util.h"
#include "base/values.h"
namespace chromeos {
namespace ash {
namespace {
@ -131,4 +131,4 @@ std::string NetworkUIData::GetONCSourceAsString() const {
return EnumToString(kONCSourceTable, onc_source_);
}
} // namespace chromeos
} // namespace ash

@ -12,7 +12,7 @@
#include "base/values.h"
#include "components/onc/onc_constants.h"
namespace chromeos {
namespace ash {
// Helper for accessing and setting values in the network's UI data dictionary.
// Accessing values is done via static members that take the network as an
@ -51,11 +51,6 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) NetworkUIData {
base::Value user_settings_;
};
} // namespace chromeos
// TODO(https://crbug.com/1164001): remove when it moved to ash.
namespace ash {
using ::chromeos::NetworkUIData;
}
} // namespace ash
#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_NETWORK_UI_DATA_H_

@ -7,7 +7,7 @@
#include "base/values.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace chromeos {
namespace ash {
TEST(NetworkUIDataTest, ONCSource) {
base::Value ui_data_dict(base::Value::Type::DICTIONARY);
@ -30,4 +30,4 @@ TEST(NetworkUIDataTest, ONCSource) {
}
}
} // namespace chromeos
} // namespace ash

@ -20,13 +20,12 @@
#include "base/component_export.h"
#include "base/time/time.h"
#include "base/values.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_state.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_type_pattern.h"
namespace ash {
class NetworkState;
class NetworkTypePattern;
// Struct for passing wifi access point data.
struct COMPONENT_EXPORT(CHROMEOS_NETWORK) WifiAccessPoint {
WifiAccessPoint();

@ -28,7 +28,7 @@
#include "dbus/object_path.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
namespace chromeos {
namespace ash {
namespace {
@ -471,4 +471,4 @@ void PolicyApplicator::NotifyConfigurationHandlerAndFinish() {
handler_->OnPoliciesApplied(profile_, new_cellular_policy_guids_);
}
} // namespace chromeos
} // namespace ash

@ -15,12 +15,11 @@
#include "base/memory/weak_ptr.h"
#include "base/sequence_checker.h"
#include "base/values.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/managed_cellular_pref_handler.h"
#include "chromeos/ash/components/network/network_profile.h"
namespace chromeos {
namespace ash {
class ManagedCellularPrefHandler;
class NetworkUIData;
// This class compares (entry point is Run()) |modified_policies| with the
@ -166,11 +165,6 @@ class PolicyApplicator {
base::WeakPtrFactory<PolicyApplicator> weak_ptr_factory_{this};
};
} // namespace chromeos
// TODO(https://crbug.com/1164001): remove when it moved to ash.
namespace ash {
using ::chromeos::PolicyApplicator;
}
} // namespace ash
#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_POLICY_APPLICATOR_H_

@ -17,7 +17,7 @@ class X509Certificate;
using CertificateList = std::vector<scoped_refptr<X509Certificate>>;
} // namespace net
namespace chromeos {
namespace ash {
// An interface for a class which makes server and authority certificates
// available from enterprise policy. Clients of this interface can register as
@ -70,6 +70,6 @@ class PolicyCertificateProvider {
const = 0;
};
} // namespace chromeos
} // namespace ash
#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_POLICY_CERTIFICATE_PROVIDER_H_

@ -8,14 +8,16 @@
#include <string>
#include "base/component_export.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_profile.h"
namespace base {
class Value;
}
namespace ash::policy_util {
namespace ash {
struct NetworkProfile;
namespace policy_util {
// This fake credential contains a random postfix which is extremely unlikely to
// be used by any user. Used to determine saved but unknown credential
@ -72,7 +74,8 @@ const std::string* GetIccidFromONC(const base::Value& onc_config);
// If there is no SMDPAddress, returns nullptr.
const std::string* GetSMDPAddressFromONC(const base::Value& onc_config);
} // namespace ash::policy_util
} // namespace policy_util
} // namespace ash
// TODO(https://crbug.com/1164001): remove when the migration is finished.
namespace chromeos {

@ -19,7 +19,7 @@
#include "components/onc/onc_constants.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
namespace chromeos {
namespace ash {
namespace {
@ -272,4 +272,4 @@ const ProfilePolicies::NetworkPolicy* ProfilePolicies::FindPolicy(
return iter != guid_to_policy_.end() ? &(iter->second) : nullptr;
}
} // namespace chromeos
} // namespace ash

@ -15,7 +15,7 @@
#include "chromeos/ash/components/network/client_cert_util.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
namespace chromeos {
namespace ash {
// Stores network policies for a shill profile.
// Understands some ONC (OpenNetworkConfiguration) concepts such as
@ -200,11 +200,6 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) ProfilePolicies {
base::flat_map<std::string, std::string> profile_wide_expansions_;
};
} // namespace chromeos
// TODO(https://crbug.com/1164001): remove when it moved to ash.
namespace ash {
using ::chromeos::ProfilePolicies;
}
} // namespace ash
#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_PROFILE_POLICIES_H_

@ -13,7 +13,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace chromeos {
namespace ash {
namespace {
@ -584,4 +584,4 @@ TEST(ProfilePoliciesTest, SetResolvedClientCertificateUnknownGuid) {
EXPECT_FALSE(change_had_effect);
}
} // namespace chromeos
} // namespace ash

@ -26,7 +26,7 @@
#include "dbus/object_path.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
namespace chromeos {
namespace ash {
namespace {
@ -120,4 +120,4 @@ void SetProxyConfigForNetwork(const ProxyConfigDictionary& proxy_config,
} // namespace proxy_config
} // namespace chromeos
} // namespace ash

@ -8,16 +8,15 @@
#include <memory>
#include "base/component_export.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_profile_handler.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_state.h"
#include "components/onc/onc_constants.h"
class PrefService;
class ProxyConfigDictionary;
namespace chromeos {
namespace ash {
class NetworkProfileHandler;
class NetworkState;
namespace proxy_config {
@ -38,15 +37,6 @@ void SetProxyConfigForNetwork(const ProxyConfigDictionary& proxy_config,
const NetworkState& network);
} // namespace proxy_config
} // namespace chromeos
// TODO(https://crbug.com/1164001): remove after the migration is finished.
namespace ash {
namespace proxy_config {
using ::chromeos::proxy_config::GetProxyConfigForNetwork;
using ::chromeos::proxy_config::SetProxyConfigForNetwork;
} // namespace proxy_config
} // namespace ash
#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_PROXY_PROXY_CONFIG_HANDLER_H_

@ -26,7 +26,7 @@
#include "components/proxy_config/proxy_prefs.h"
#include "components/user_manager/user_manager.h"
namespace chromeos {
namespace ash {
namespace {
@ -281,4 +281,4 @@ void ProxyConfigServiceImpl::DetermineEffectiveConfigFromDefaultNetwork() {
}
}
} // namespace chromeos
} // namespace ash

@ -10,14 +10,14 @@
#include "base/compiler_specific.h"
#include "base/component_export.h"
#include "base/task/single_thread_task_runner.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_state.h"
#include "chromeos/ash/components/network/network_state_handler_observer.h"
#include "components/onc/onc_constants.h"
#include "components/prefs/pref_change_registrar.h"
#include "components/proxy_config/pref_proxy_config_tracker_impl.h"
namespace chromeos {
namespace ash {
class NetworkState;
// Implementation of proxy config service for chromeos that:
// - extends PrefProxyConfigTrackerImpl (and so lives and runs entirely on UI
@ -105,11 +105,6 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) ProxyConfigServiceImpl
base::WeakPtrFactory<ProxyConfigServiceImpl> pointer_factory_{this};
};
} // namespace chromeos
// TODO(https://crbug.com/1164001): remove after the migration is finished.
namespace ash {
using ::chromeos::ProxyConfigServiceImpl;
}
} // namespace ash
#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_PROXY_PROXY_CONFIG_SERVICE_IMPL_H_

@ -17,7 +17,7 @@
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace chromeos {
namespace ash {
namespace {
const char kFixedPacUrl[] = "http://fixed/";
@ -123,4 +123,4 @@ TEST_F(ProxyConfigServiceImplTest, UsesNestedProxyConfigService) {
proxy_tracker.DetachFromPrefService();
}
} // namespace chromeos
} // namespace ash

@ -9,15 +9,17 @@
#include <string>
#include "base/component_export.h"
// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/ash/components/network/network_ui_data.h"
#include "components/onc/onc_constants.h"
namespace base {
class Value;
}
namespace ash::shill_property_util {
namespace ash {
class NetworkUIData;
namespace shill_property_util {
// Sets the |ssid| in |properties|.
COMPONENT_EXPORT(CHROMEOS_NETWORK)
@ -93,7 +95,8 @@ bool DoIdentifyingPropertiesMatch(const base::Value& new_properties,
// be relied upon).
bool IsLoggableShillProperty(const std::string& key);
} // namespace ash::shill_property_util
} // namespace shill_property_util
} // namespace ash
// TODO(https://crbug.com/1164001): remove when the migration is finished.
namespace chromeos {

@ -14,7 +14,7 @@
#include "base/timer/timer.h"
#include "net/cert/nss_cert_database.h"
namespace chromeos {
namespace ash {
namespace {
@ -114,4 +114,4 @@ void SystemTokenCertDbStorage::OnSystemTokenDbRetrievalTimeout() {
/*nss_cert_database=*/nullptr);
}
} // namespace chromeos
} // namespace ash

@ -19,7 +19,7 @@ namespace net {
class NSSCertDatabase;
}
namespace chromeos {
namespace ash {
// Used by SystemTokenCertDbInitializer to save the system token certificate
// database when it is ready.
@ -109,11 +109,11 @@ class COMPONENT_EXPORT(CHROMEOS_NETWORK) SystemTokenCertDbStorage {
SEQUENCE_CHECKER(sequence_checker_);
};
} // namespace chromeos
// TODO(https://crbug.com/1164001): remove when moved to ash.
namespace ash {
using ::chromeos::SystemTokenCertDbStorage;
} // namespace ash
// TODO(https://crbug.com/1164001): remove when the migration is finished.
namespace chromeos {
using ::ash::SystemTokenCertDbStorage;
}
#endif // CHROMEOS_ASH_COMPONENTS_NETWORK_SYSTEM_TOKEN_CERT_DB_STORAGE_H_

@ -17,7 +17,7 @@
#include "net/cert/nss_cert_database.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace chromeos {
namespace ash {
class SystemTokenCertDbStorageTest : public testing::Test {
public:
@ -200,4 +200,4 @@ TEST_F(SystemTokenCertDbStorageTest, RequestingDatabaseFailsAfterReset) {
get_system_token_cert_db_callback_wrapper_2.IsDbRetrievalSucceeded());
}
} // namespace chromeos
} // namespace ash

@ -126,6 +126,7 @@ bool ResolveServerCertRefsInNetwork(const CertPEMsByGUIDMap& certs_by_guid,
// TODO(https://crbug.com/1164001): remove when it moved to ash.
namespace ash::onc {
using ::chromeos::onc::ExpandStringsInOncObject;
using ::chromeos::onc::FillInHexSSIDField;
using ::chromeos::onc::FillInHexSSIDFieldsInOncObject;
using ::chromeos::onc::MaskCredentialsInOncObject;

@ -28,7 +28,7 @@ class SingleThreadTaskRunner;
// settings (pushed from PrefProxyConfigTrackerImpl) as overrides to the proxy
// configuration determined by a baseline delegate ProxyConfigService on
// non-ChromeOS platforms. ChromeOS has its own implementation of overrides in
// chromeos::ProxyConfigServiceImpl.
// ash::ProxyConfigServiceImpl.
class ProxyConfigServiceImpl : public net::ProxyConfigService,
public net::ProxyConfigService::Observer {
public:

@ -91,8 +91,8 @@ bool IsLoopbackAddress(const net::IPAddress& address) {
} // namespace
void OpenFirewallHole(const net::IPEndPoint& address,
chromeos::FirewallHole::PortType type,
chromeos::FirewallHole::OpenCallback callback) {
ash::FirewallHole::PortType type,
ash::FirewallHole::OpenCallback callback) {
if (IsLoopbackAddress(address.address())) {
std::move(callback).Run(nullptr);
return;
@ -103,19 +103,19 @@ void OpenFirewallHole(const net::IPEndPoint& address,
// can be resolved by the address, but the best solution would be to update
// firewalld to allow filtering by destination address, not just destination
// port. iptables already support it.
chromeos::FirewallHole::Open(type, address.port(), std::string(),
std::move(callback));
ash::FirewallHole::Open(type, address.port(), std::string(),
std::move(callback));
}
void OpenTCPFirewallHole(const net::IPEndPoint& address,
chromeos::FirewallHole::OpenCallback callback) {
OpenFirewallHole(address, chromeos::FirewallHole::PortType::TCP,
ash::FirewallHole::OpenCallback callback) {
OpenFirewallHole(address, ash::FirewallHole::PortType::TCP,
std::move(callback));
}
void OpenUDPFirewallHole(const net::IPEndPoint& address,
chromeos::FirewallHole::OpenCallback callback) {
OpenFirewallHole(address, chromeos::FirewallHole::PortType::UDP,
ash::FirewallHole::OpenCallback callback) {
OpenFirewallHole(address, ash::FirewallHole::PortType::UDP,
std::move(callback));
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)

@ -45,10 +45,10 @@ bool CanUseSocketAPIs(bool external_plugin,
// Returns true if the open operation is in progress.
void OpenTCPFirewallHole(const net::IPEndPoint& address,
chromeos::FirewallHole::OpenCallback callback);
ash::FirewallHole::OpenCallback callback);
void OpenUDPFirewallHole(const net::IPEndPoint& address,
chromeos::FirewallHole::OpenCallback callback);
ash::FirewallHole::OpenCallback callback);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Annotations for TCP and UDP network requests. Defined here to make it easier

@ -275,7 +275,7 @@ void PepperTCPServerSocketMessageFilter::OpenFirewallHole(
void PepperTCPServerSocketMessageFilter::OnFirewallHoleOpened(
const ppapi::host::ReplyMessageContext& context,
std::unique_ptr<chromeos::FirewallHole> hole) {
std::unique_ptr<ash::FirewallHole> hole) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
LOG_IF(WARNING, !hole.get()) << "Firewall hole could not be opened.";

@ -143,7 +143,7 @@ class CONTENT_EXPORT PepperTCPServerSocketMessageFilter
void OpenFirewallHole(const ppapi::host::ReplyMessageContext& context,
const net::IPEndPoint& local_addr);
void OnFirewallHoleOpened(const ppapi::host::ReplyMessageContext& context,
std::unique_ptr<chromeos::FirewallHole> hole);
std::unique_ptr<ash::FirewallHole> hole);
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
// Following fields are initialized and used only on the IO thread.
@ -161,8 +161,7 @@ class CONTENT_EXPORT PepperTCPServerSocketMessageFilter
PP_NetAddress_Private bound_addr_;
#if BUILDFLAG(IS_CHROMEOS_ASH)
std::unique_ptr<chromeos::FirewallHole,
content::BrowserThread::DeleteOnUIThread>
std::unique_ptr<ash::FirewallHole, content::BrowserThread::DeleteOnUIThread>
firewall_hole_;
#endif // BUILDFLAG(IS_CHROMEOS_ASH)

@ -1200,7 +1200,7 @@ void PepperTCPSocketMessageFilter::OpenFirewallHole(
void PepperTCPSocketMessageFilter::OnFirewallHoleOpened(
const ppapi::host::ReplyMessageContext& context,
std::unique_ptr<chromeos::FirewallHole> hole) {
std::unique_ptr<ash::FirewallHole> hole) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
DCHECK(state_.IsPending(TCPSocketState::LISTEN));
LOG_IF(WARNING, !hole.get()) << "Firewall hole could not be opened.";

Some files were not shown because too many files have changed in this diff Show More