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_client_mac.h" | 5 #include "chrome/browser/local_discovery/service_discovery_client_mac.h" |
6 | 6 |
7 #import <arpa/inet.h> | 7 #import <arpa/inet.h> |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 #import <net/if_dl.h> | 9 #import <net/if_dl.h> |
10 #include <stddef.h> | 10 #include <stddef.h> |
11 #include <stdint.h> | 11 #include <stdint.h> |
12 | 12 |
13 #include "base/debug/dump_without_crashing.h" | 13 #include "base/debug/dump_without_crashing.h" |
14 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
15 #include "base/metrics/histogram.h" | 15 #include "base/metrics/histogram.h" |
16 #include "base/single_thread_task_runner.h" | 16 #include "base/single_thread_task_runner.h" |
17 #include "base/thread_task_runner_handle.h" | |
18 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
| 18 #include "base/threading/thread_task_runner_handle.h" |
19 #include "net/base/ip_address.h" | 19 #include "net/base/ip_address.h" |
20 #include "net/base/ip_endpoint.h" | 20 #include "net/base/ip_endpoint.h" |
21 | 21 |
22 using local_discovery::ServiceWatcherImplMac; | 22 using local_discovery::ServiceWatcherImplMac; |
23 using local_discovery::ServiceResolverImplMac; | 23 using local_discovery::ServiceResolverImplMac; |
24 | 24 |
25 @interface NetServiceBrowserDelegate | 25 @interface NetServiceBrowserDelegate |
26 : NSObject<NSNetServiceBrowserDelegate, NSNetServiceDelegate> { | 26 : NSObject<NSNetServiceBrowserDelegate, NSNetServiceDelegate> { |
27 @private | 27 @private |
28 ServiceWatcherImplMac::NetServiceBrowserContainer* container_; // weak. | 28 ServiceWatcherImplMac::NetServiceBrowserContainer* container_; // weak. |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 container_->OnResolveUpdate(local_discovery::ServiceResolver::STATUS_SUCCESS); | 484 container_->OnResolveUpdate(local_discovery::ServiceResolver::STATUS_SUCCESS); |
485 } | 485 } |
486 | 486 |
487 - (void)netService:(NSNetService *)sender | 487 - (void)netService:(NSNetService *)sender |
488 didNotResolve:(NSDictionary *)errorDict { | 488 didNotResolve:(NSDictionary *)errorDict { |
489 container_->OnResolveUpdate( | 489 container_->OnResolveUpdate( |
490 local_discovery::ServiceResolver::STATUS_REQUEST_TIMEOUT); | 490 local_discovery::ServiceResolver::STATUS_REQUEST_TIMEOUT); |
491 } | 491 } |
492 | 492 |
493 @end | 493 @end |
OLD | NEW |