#include "chrome/browser/media/router/discovery/dial/dial_registry.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/strings/string_number_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "base/time/default_clock.h"
#include "base/time/time.h"
#include "base/values.h"
#include "chrome/browser/media/router/discovery/dial/dial_device_data.h"
#include "chrome/browser/media/router/discovery/dial/dial_service_impl.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/network_service_instance.h"
Time;
BrowserThread;
namespace {
const int kDialRefreshIntervalSecs = …;
const int kDialExpirationSecs = …;
const size_t kDialMaxDevices = …;
}
namespace media_router {
DialRegistry::DialRegistry(
DialRegistry::Client& client,
const scoped_refptr<base::SequencedTaskRunner>& task_runner)
: … { … }
DialRegistry::~DialRegistry() = default;
void DialRegistry::SetNetworkConnectionTracker(
network::NetworkConnectionTracker* tracker) { … }
void DialRegistry::SetNetLog(net::NetLog* net_log) { … }
void DialRegistry::Start() { … }
std::unique_ptr<DialService> DialRegistry::CreateDialService() { … }
void DialRegistry::ClearDialService() { … }
GURL DialRegistry::GetDeviceDescriptionURL(const std::string& label) const { … }
void DialRegistry::AddDeviceForTest(const DialDeviceData& device_data) { … }
void DialRegistry::SetClockForTest(base::Clock* clock) { … }
bool DialRegistry::ReadyToDiscover() { … }
bool DialRegistry::DiscoverNow() { … }
void DialRegistry::StartPeriodicDiscovery() { … }
void DialRegistry::DoDiscovery() { … }
void DialRegistry::StopPeriodicDiscovery() { … }
bool DialRegistry::PruneExpiredDevices() { … }
bool DialRegistry::IsDeviceExpired(const DialDeviceData& device) const { … }
void DialRegistry::Clear() { … }
void DialRegistry::MaybeSendDeviceList() { … }
std::string DialRegistry::NextLabel() { … }
void DialRegistry::OnDiscoveryRequest() { … }
void DialRegistry::OnDeviceDiscovered(const DialDeviceData& device) { … }
bool DialRegistry::MaybeAddDevice(std::unique_ptr<DialDeviceData> device_data) { … }
void DialRegistry::OnDiscoveryFinished() { … }
void DialRegistry::OnError(DialService::DialServiceErrorCode code) { … }
void DialRegistry::OnConnectionChanged(network::mojom::ConnectionType type) { … }
}