OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/utility/local_discovery/service_discovery_message_handler.h" | 5 #include "chrome/utility/local_discovery/service_discovery_message_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "chrome/common/local_discovery/local_discovery_messages.h" | 10 #include "chrome/common/local_discovery/local_discovery_messages.h" |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 local_domain_resolvers_.clear(); | 389 local_domain_resolvers_.clear(); |
390 | 390 |
391 service_discovery_client_.reset(); | 391 service_discovery_client_.reset(); |
392 mdns_client_.reset(); | 392 mdns_client_.reset(); |
393 } | 393 } |
394 | 394 |
395 void ServiceDiscoveryMessageHandler::OnServiceUpdated( | 395 void ServiceDiscoveryMessageHandler::OnServiceUpdated( |
396 uint64 id, | 396 uint64 id, |
397 ServiceWatcher::UpdateType update, | 397 ServiceWatcher::UpdateType update, |
398 const std::string& name) { | 398 const std::string& name) { |
399 VLOG(1) << "OnServiceUpdated with id " << id | 399 VLOG(1) << "OnServiceUpdated with id " << id << WatcherUpdateToString(update); |
400 << WatcherUpdateToString(update); | |
401 DCHECK(service_discovery_client_); | 400 DCHECK(service_discovery_client_); |
402 utility_task_runner_->PostTask(FROM_HERE, | 401 utility_task_runner_->PostTask(FROM_HERE, |
403 base::Bind(&SendServiceUpdated, id, update, name)); | 402 base::Bind(&SendServiceUpdated, id, update, name)); |
404 } | 403 } |
405 | 404 |
406 void ServiceDiscoveryMessageHandler::OnServiceResolved( | 405 void ServiceDiscoveryMessageHandler::OnServiceResolved( |
407 uint64 id, | 406 uint64 id, |
408 ServiceResolver::RequestStatus status, | 407 ServiceResolver::RequestStatus status, |
409 const ServiceDescription& description) { | 408 const ServiceDescription& description) { |
410 VLOG(1) << "OnServiceResolved with id " << id << " and status " | 409 VLOG(1) << "OnServiceResolved with id " << id << " and status " |
(...skipping 18 matching lines...) Expand all Loading... |
429 | 428 |
430 DCHECK(service_discovery_client_); | 429 DCHECK(service_discovery_client_); |
431 utility_task_runner_->PostTask(FROM_HERE, base::Bind(&SendLocalDomainResolved, | 430 utility_task_runner_->PostTask(FROM_HERE, base::Bind(&SendLocalDomainResolved, |
432 id, success, | 431 id, success, |
433 address_ipv4, | 432 address_ipv4, |
434 address_ipv6)); | 433 address_ipv6)); |
435 } | 434 } |
436 | 435 |
437 | 436 |
438 } // namespace local_discovery | 437 } // namespace local_discovery |
OLD | NEW |