| 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/browser/local_discovery/service_discovery_device_lister.h" | 5 #include "chrome/browser/local_discovery/service_discovery_device_lister.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/message_loop/message_loop.h" | 11 #include "base/message_loop/message_loop.h" |
| 12 #include "build/build_config.h" |
| 12 | 13 |
| 13 namespace local_discovery { | 14 namespace local_discovery { |
| 14 | 15 |
| 15 namespace { | 16 namespace { |
| 16 #if defined(OS_MACOSX) | 17 #if defined(OS_MACOSX) |
| 17 const int kMacServiceResolvingIntervalSecs = 60; | 18 const int kMacServiceResolvingIntervalSecs = 60; |
| 18 #endif | 19 #endif |
| 19 } // namespace | 20 } // namespace |
| 20 | 21 |
| 21 ServiceDiscoveryDeviceLister::ServiceDiscoveryDeviceLister( | 22 ServiceDiscoveryDeviceLister::ServiceDiscoveryDeviceLister( |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 void ServiceDiscoveryDeviceLister::CreateServiceWatcher() { | 116 void ServiceDiscoveryDeviceLister::CreateServiceWatcher() { |
| 116 service_watcher_ = | 117 service_watcher_ = |
| 117 service_discovery_client_->CreateServiceWatcher( | 118 service_discovery_client_->CreateServiceWatcher( |
| 118 service_type_, | 119 service_type_, |
| 119 base::Bind(&ServiceDiscoveryDeviceLister::OnServiceUpdated, | 120 base::Bind(&ServiceDiscoveryDeviceLister::OnServiceUpdated, |
| 120 weak_factory_.GetWeakPtr())); | 121 weak_factory_.GetWeakPtr())); |
| 121 service_watcher_->Start(); | 122 service_watcher_->Start(); |
| 122 } | 123 } |
| 123 | 124 |
| 124 } // namespace local_discovery | 125 } // namespace local_discovery |
| OLD | NEW |