Lines Matching refs:identity

166     for (const auto& [identity, server] : tmp) {  in setDot()
167 if (tracker.find(identity) == tracker.end()) { in setDot()
168 tracker[identity] = server; in setDot()
172 for (auto& [identity, server] : tracker) { in setDot()
173 const bool active = tmp.find(identity) != tmp.end(); in setDot()
178 updateServerState(identity, Validation::success_but_expired, netId); in setDot()
182 updateServerState(identity, Validation::in_process, netId); in setDot()
183 startDotValidation(identity, netId, false); in setDot()
301 const ServerIdentity& identity, in requestDotValidation() argument
315 auto result = getDotServerLocked(identity, netId); in requestDotValidation()
333 updateServerState(identity, Validation::in_process, netId); in requestDotValidation()
334 startDotValidation(identity, netId, true); in requestDotValidation()
338 void PrivateDnsConfiguration::startDotValidation(const ServerIdentity& identity, unsigned netId, in startDotValidation() argument
343 const auto result = getDotServerLocked(identity, netId); in startDotValidation()
347 std::thread validate_thread([this, identity, server, netId, isRevalidation] { in startDotValidation()
375 this->recordDotValidation(identity, netId, success, isRevalidation); in startDotValidation()
395 void PrivateDnsConfiguration::sendPrivateDnsValidationEvent(const ServerIdentity& identity, in sendPrivateDnsValidationEvent() argument
398 << netId << " for " << identity.sockaddr.toString() << " with hostname {" in sendPrivateDnsValidationEvent()
399 << identity.provider << "}"; in sendPrivateDnsValidationEvent()
407 it->onPrivateDnsValidationEvent(netId, identity.sockaddr.ip().toString(), identity.provider, in sendPrivateDnsValidationEvent()
415 .ipAddress = identity.sockaddr.ip().toString(), in sendPrivateDnsValidationEvent()
416 .hostname = identity.provider, in sendPrivateDnsValidationEvent()
419 .protocol = (identity.sockaddr.port() == kDotPort) in sendPrivateDnsValidationEvent()
428 bool PrivateDnsConfiguration::recordDotValidation(const ServerIdentity& identity, unsigned netId, in recordDotValidation() argument
438 notifyValidationStateUpdate(identity.sockaddr, Validation::fail, netId); in recordDotValidation()
445 notifyValidationStateUpdate(identity.sockaddr, Validation::fail, netId); in recordDotValidation()
456 auto serverPair = tracker.find(identity); in recordDotValidation()
458 LOG(WARNING) << "Server " << identity.sockaddr.ip().toString() in recordDotValidation()
463 LOG(WARNING) << "Server " << identity.sockaddr.ip().toString() in recordDotValidation()
470 if (needReportEvent(netId, identity, success)) { in recordDotValidation()
471 sendPrivateDnsValidationEvent(identity, netId, success); in recordDotValidation()
475 updateServerState(identity, Validation::success, netId); in recordDotValidation()
482 updateServerState(identity, result, netId); in recordDotValidation()
489 void PrivateDnsConfiguration::updateServerState(const ServerIdentity& identity, Validation state, in updateServerState() argument
491 const auto result = getDotServerLocked(identity, netId); in updateServerState()
493 notifyValidationStateUpdate(identity.sockaddr, Validation::fail, netId); in updateServerState()
500 notifyValidationStateUpdate(identity.sockaddr, state, netId); in updateServerState()
502 RecordEntry record(netId, identity, state); in updateServerState()
522 base::Result<DnsTlsServer*> PrivateDnsConfiguration::getDotServer(const ServerIdentity& identity, in getDotServer() argument
525 return getDotServerLocked(identity, netId); in getDotServer()
529 const ServerIdentity& identity, unsigned netId) { in getDotServerLocked() argument
535 auto iter = netPair->second.find(identity); in getDotServerLocked()
538 identity.sockaddr.toString(), identity.provider); in getDotServerLocked()
690 const ServerIdentity identity = {IPSockAddr::toIPSockAddr(ipAddr, kDohPort), host}; in onDohStatusUpdate() local
691 if (needReportEvent(netId, identity, success)) { in onDohStatusUpdate()
692 sendPrivateDnsValidationEvent(identity, netId, success); in onDohStatusUpdate()
695 RecordEntry record(netId, identity, status); in onDohStatusUpdate()
699 bool PrivateDnsConfiguration::needReportEvent(uint32_t netId, ServerIdentity identity, in needReportEvent() argument
705 switch (identity.sockaddr.port()) { in needReportEvent()
711 if ((identity.sockaddr.ip() == id.sockaddr.ip()) && in needReportEvent()
712 (identity.sockaddr.port() != id.sockaddr.port()) && in needReportEvent()
716 << identity.sockaddr.ip().toString(); in needReportEvent()
726 if (it->second == identity && it->second.status == Validation::success) { in needReportEvent()
729 << identity.sockaddr.ip().toString(); in needReportEvent()