Skip to content

Commit

Permalink
Change namespace chromeos => ash for //c/b/ash/smb_client
Browse files Browse the repository at this point in the history
Code in //chrome/browser/ash/smb_client is a part of the ash-chrome,
so namespace is changed to ash from chromeos.

To avoid churn during other namespace transitions in future, this CL has
temporary 'using' declarations.

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

Change-Id: I236430021c696411e4d065080eb41d4ae0698971
Bug: 1164001
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2959150
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Owners-Override: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Yeunjoo Choi <ychoi@igalia.com>
Cr-Commit-Position: refs/heads/master@{#892372}
  • Loading branch information
duswnchl authored and Chromium LUCI CQ committed Jun 15, 2021
1 parent 20be5cf commit 7faf6af
Show file tree
Hide file tree
Showing 81 changed files with 229 additions and 197 deletions.
7 changes: 0 additions & 7 deletions chrome/browser/ash/file_system_provider/request_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,4 @@ class RequestManager {
} // namespace file_system_provider
} // namespace ash

// TODO(https://crbug.com/1164001): remove when ChromeOS code migration is done.
namespace chromeos {
namespace file_system_provider {
using ::ash::file_system_provider::RequestManager;
} // namespace file_system_provider
} // namespace chromeos

#endif // CHROME_BROWSER_ASH_FILE_SYSTEM_PROVIDER_REQUEST_MANAGER_H_
3 changes: 1 addition & 2 deletions chrome/browser/ash/file_system_provider/service.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ class PrefRegistrySyncable;
namespace ash {
namespace file_system_provider {

// TODO(https://crbug.com/1164001): forward declare ProvidedFileSystemInterface
// when //c/b/chromeos/smb_client is moved to ash.
class ProvidedFileSystemInfo;
class ProvidedFileSystemInterface;
class RegistryInterface;
struct MountOptions;

Expand Down
5 changes: 2 additions & 3 deletions chrome/browser/ash/guest_os/guest_os_share_path.cc
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,8 @@ void GuestOsSharePath::CallSeneschalSharePath(const std::string& vm_name,
drive::DriveIntegrationServiceFactory::GetForProfile(profile_);
base::FilePath drivefs_mount_point_path;
base::FilePath drivefs_mount_name;
chromeos::smb_client::SmbService* smb_service =
chromeos::smb_client::SmbServiceFactory::Get(profile_);
chromeos::smb_client::SmbFsShare* smb_share = nullptr;
auto* smb_service = ash::smb_client::SmbServiceFactory::Get(profile_);
ash::smb_client::SmbFsShare* smb_share = nullptr;
base::FilePath smbfs_mount_point_path;
base::FilePath smbfs_mount_name;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "net/base/ip_endpoint.h"

namespace chromeos {
namespace ash {
namespace smb_client {

FakeNetBiosClient::FakeNetBiosClient() = default;
Expand All @@ -31,4 +31,4 @@ void FakeNetBiosClient::ExecuteNameRequest(
}

} // namespace smb_client
} // namespace chromeos
} // namespace ash
6 changes: 2 additions & 4 deletions chrome/browser/ash/smb_client/discovery/fake_netbios_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@
#include "chrome/browser/ash/smb_client/discovery/netbios_client_interface.h"

namespace net {

class IPAddress;
class IPEndPoint;

} // namespace net

namespace chromeos {
namespace ash {
namespace smb_client {

// FakeNetBiosClient is used for testing the NetBiosHostLocator.
Expand Down Expand Up @@ -46,6 +44,6 @@ class FakeNetBiosClient : public NetBiosClientInterface {
};

} // namespace smb_client
} // namespace chromeos
} // namespace ash

#endif // CHROME_BROWSER_ASH_SMB_CLIENT_DISCOVERY_FAKE_NETBIOS_CLIENT_H_
4 changes: 2 additions & 2 deletions chrome/browser/ash/smb_client/discovery/host_locator.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "base/callback.h"
#include "net/base/ip_address.h"

namespace chromeos {
namespace ash {
namespace smb_client {

using Hostname = std::string;
Expand Down Expand Up @@ -40,6 +40,6 @@ class HostLocator {
};

} // namespace smb_client
} // namespace chromeos
} // namespace ash

#endif // CHROME_BROWSER_ASH_SMB_CLIENT_DISCOVERY_HOST_LOCATOR_H_
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include <map>
#include <utility>

namespace chromeos {
namespace ash {
namespace smb_client {

InMemoryHostLocator::InMemoryHostLocator() = default;
Expand Down Expand Up @@ -45,4 +45,4 @@ void InMemoryHostLocator::RunCallback() {
}

} // namespace smb_client
} // namespace chromeos
} // namespace ash
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "chrome/browser/ash/smb_client/discovery/host_locator.h"

namespace chromeos {
namespace ash {
namespace smb_client {

// HostLocator implementation that uses a map as the source for hosts. New hosts
Expand Down Expand Up @@ -43,6 +43,6 @@ class InMemoryHostLocator : public HostLocator {
};

} // namespace smb_client
} // namespace chromeos
} // namespace ash

#endif // CHROME_BROWSER_ASH_SMB_CLIENT_DISCOVERY_IN_MEMORY_HOST_LOCATOR_H_
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "base/bind.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace chromeos {
namespace ash {
namespace smb_client {

namespace {
Expand Down Expand Up @@ -156,4 +156,4 @@ TEST_F(InMemoryHostLocatorTest, AddHostsShouldKeepPreviousHostsAndOverwrite) {
}

} // namespace smb_client
} // namespace chromeos
} // namespace ash
4 changes: 2 additions & 2 deletions chrome/browser/ash/smb_client/discovery/mdns_host_locator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "net/dns/public/dns_protocol.h"
#include "net/dns/record_rdata.h"

namespace chromeos {
namespace ash {
namespace smb_client {

namespace {
Expand Down Expand Up @@ -349,4 +349,4 @@ void MDnsHostLocator::Impl::FireCallback(bool success) {
}

} // namespace smb_client
} // namespace chromeos
} // namespace ash
4 changes: 2 additions & 2 deletions chrome/browser/ash/smb_client/discovery/mdns_host_locator.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "base/single_thread_task_runner.h"
#include "chrome/browser/ash/smb_client/discovery/host_locator.h"

namespace chromeos {
namespace ash {
namespace smb_client {

// Removes .local from |raw_hostname| if located at the end of the string and
Expand Down Expand Up @@ -60,6 +60,6 @@ class MDnsHostLocator : public HostLocator {
};

} // namespace smb_client
} // namespace chromeos
} // namespace ash

#endif // CHROME_BROWSER_ASH_SMB_CLIENT_DISCOVERY_MDNS_HOST_LOCATOR_H_
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "chrome/browser/ash/smb_client/discovery/mdns_host_locator.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace chromeos {
namespace ash {
namespace smb_client {

class MDnsHostLocatorTest : public testing::Test {
Expand All @@ -28,4 +28,4 @@ TEST_F(MDnsHostLocatorTest, RemoveLocal) {
}

} // namespace smb_client
} // namespace chromeos
} // namespace ash
4 changes: 2 additions & 2 deletions chrome/browser/ash/smb_client/discovery/netbios_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "services/network/public/mojom/network_context.mojom.h"

namespace chromeos {
namespace ash {
namespace smb_client {

namespace {
Expand Down Expand Up @@ -184,4 +184,4 @@ std::vector<uint8_t> NetBiosClient::GenerateBroadcastPacket() {
}

} // namespace smb_client
} // namespace chromeos
} // namespace ash
13 changes: 4 additions & 9 deletions chrome/browser/ash/smb_client/discovery/netbios_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,24 @@

#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/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"
#include "services/network/public/mojom/udp_socket.mojom.h"

namespace net {

class IPEndPoint;

} // namespace net

namespace network {
namespace mojom {

class NetworkContext;

} // namespace mojom
} // namespace network

namespace chromeos {

class FirewallHole;

namespace ash {
namespace smb_client {

// NetBiosClient handles a NetBios Name Query Request.
Expand Down Expand Up @@ -113,6 +108,6 @@ class NetBiosClient : public network::mojom::UDPSocketListener,
};

} // namespace smb_client
} // namespace chromeos
} // namespace ash

#endif // CHROME_BROWSER_ASH_SMB_CLIENT_DISCOVERY_NETBIOS_CLIENT_H_
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@
#include "base/macros.h"

namespace net {

class IPAddress;
class IPEndPoint;

} // namespace net

namespace chromeos {
namespace ash {
namespace smb_client {

using NetBiosResponseCallback = base::RepeatingCallback<
Expand All @@ -40,6 +38,6 @@ class NetBiosClientInterface {
};

} // namespace smb_client
} // namespace chromeos
} // namespace ash

#endif // CHROME_BROWSER_ASH_SMB_CLIENT_DISCOVERY_NETBIOS_CLIENT_INTERFACE_H_
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "net/base/ip_endpoint.h"
#include "net/base/network_change_notifier.h"

namespace chromeos {
namespace ash {
namespace smb_client {
namespace {

Expand Down Expand Up @@ -197,4 +197,4 @@ bool NetBiosHostLocator::WouldOverwriteResult(
}

} // namespace smb_client
} // namespace chromeos
} // namespace ash
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "chromeos/dbus/smb_provider_client.h"
#include "net/base/network_interfaces.h"

namespace chromeos {
namespace ash {
namespace smb_client {

// Calculates the broadcast address of a network interface.
Expand Down Expand Up @@ -113,6 +113,6 @@ class NetBiosHostLocator : public HostLocator,
};

} // namespace smb_client
} // namespace chromeos
} // namespace ash

#endif // CHROME_BROWSER_ASH_SMB_CLIENT_DISCOVERY_NETBIOS_HOST_LOCATOR_H_
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "net/base/ip_endpoint.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace chromeos {
namespace ash {
namespace smb_client {
namespace {

Expand Down Expand Up @@ -439,4 +439,4 @@ TEST_F(NetBiosHostLocatorTest, SecondIPUsedForResults) {
}

} // namespace smb_client
} // namespace chromeos
} // namespace ash
4 changes: 2 additions & 2 deletions chrome/browser/ash/smb_client/discovery/network_scanner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "base/strings/string_util.h"
#include "chrome/browser/ash/smb_client/discovery/host_locator.h"

namespace chromeos {
namespace ash {
namespace smb_client {

namespace {
Expand Down Expand Up @@ -131,4 +131,4 @@ void NetworkScanner::FireCallbackIfFinished(uint32_t request_id) {
}

} // namespace smb_client
} // namespace chromeos
} // namespace ash
4 changes: 2 additions & 2 deletions chrome/browser/ash/smb_client/discovery/network_scanner.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "chrome/browser/ash/smb_client/discovery/host_locator.h"
#include "net/base/ip_address.h"

namespace chromeos {
namespace ash {
namespace smb_client {

// Holds the number of in-flight requests and the callback to call once all the
Expand Down Expand Up @@ -101,6 +101,6 @@ class NetworkScanner : public base::SupportsWeakPtr<NetworkScanner> {
};

} // namespace smb_client
} // namespace chromeos
} // namespace ash

#endif // CHROME_BROWSER_ASH_SMB_CLIENT_DISCOVERY_NETWORK_SCANNER_H_
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "chrome/browser/ash/smb_client/discovery/in_memory_host_locator.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace chromeos {
namespace ash {
namespace smb_client {

namespace {
Expand Down Expand Up @@ -196,4 +196,4 @@ TEST_F(NetworkScannerTest, HostsAreStoredAsLowercase) {
}

} // namespace smb_client
} // namespace chromeos
} // namespace ash
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#include "storage/browser/file_system/file_system_url.h"
#include "storage/browser/file_system/local_file_util.h"

namespace chromeos {
namespace ash {
namespace smb_client {
namespace {

Expand Down Expand Up @@ -140,4 +140,4 @@ void SmbFsAsyncFileUtil::DeleteRecursively(
}

} // namespace smb_client
} // namespace chromeos
} // namespace ash
4 changes: 2 additions & 2 deletions chrome/browser/ash/smb_client/fileapi/smbfs_async_file_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class Profile;

namespace chromeos {
namespace ash {
namespace smb_client {

// The implementation of storage::AsyncFileUtil for SmbFs. This forwards to a
Expand Down Expand Up @@ -50,6 +50,6 @@ class SmbFsAsyncFileUtil : public storage::AsyncFileUtilAdapter {
};

} // namespace smb_client
} // namespace chromeos
} // namespace ash

#endif // CHROME_BROWSER_ASH_SMB_CLIENT_FILEAPI_SMBFS_ASYNC_FILE_UTIL_H_

0 comments on commit 7faf6af

Please sign in to comment.