| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chromeos/components/tether/host_scanner.h" | 5 #include "chromeos/components/tether/host_scanner.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "chromeos/components/tether/tether_host_fetcher.h" | 8 #include "chromeos/components/tether/tether_host_fetcher.h" |
| 9 #include "chromeos/network/network_state.h" | 9 #include "chromeos/network/network_state.h" |
| 10 #include "components/cryptauth/remote_device_loader.h" | 10 #include "components/cryptauth/remote_device_loader.h" |
| 11 | 11 |
| 12 namespace chromeos { | 12 namespace chromeos { |
| 13 | 13 |
| 14 namespace tether { | 14 namespace tether { |
| 15 | 15 |
| 16 HostScanner::HostScanner( | 16 HostScanner::HostScanner( |
| 17 TetherHostFetcher* tether_host_fetcher, | 17 TetherHostFetcher* tether_host_fetcher, |
| 18 BleConnectionManager* connection_manager, | 18 BleConnectionManager* connection_manager, |
| 19 HostScanDevicePrioritizer* host_scan_device_prioritizer, | 19 HostScanDevicePrioritizer* host_scan_device_prioritizer, |
| 20 NotificationPresenter* notification_presenter) |
| 21 : HostScanner(tether_host_fetcher, |
| 22 connection_manager, |
| 23 host_scan_device_prioritizer, |
| 24 NetworkHandler::Get()->network_state_handler(), |
| 25 notification_presenter) {} |
| 26 |
| 27 HostScanner::HostScanner( |
| 28 TetherHostFetcher* tether_host_fetcher, |
| 29 BleConnectionManager* connection_manager, |
| 30 HostScanDevicePrioritizer* host_scan_device_prioritizer, |
| 20 NetworkStateHandler* network_state_handler, | 31 NetworkStateHandler* network_state_handler, |
| 21 NotificationPresenter* notification_presenter) | 32 NotificationPresenter* notification_presenter) |
| 22 : tether_host_fetcher_(tether_host_fetcher), | 33 : tether_host_fetcher_(tether_host_fetcher), |
| 23 connection_manager_(connection_manager), | 34 connection_manager_(connection_manager), |
| 24 host_scan_device_prioritizer_(host_scan_device_prioritizer), | 35 host_scan_device_prioritizer_(host_scan_device_prioritizer), |
| 25 network_state_handler_(network_state_handler), | 36 network_state_handler_(network_state_handler), |
| 26 notification_presenter_(notification_presenter), | 37 notification_presenter_(notification_presenter), |
| 27 is_fetching_hosts_(false), | 38 is_fetching_hosts_(false), |
| 28 weak_ptr_factory_(this) {} | 39 weak_ptr_factory_(this) {} |
| 29 | 40 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 // If the final scan result has been received, the operation is finished. | 98 // If the final scan result has been received, the operation is finished. |
| 88 // Delete it. | 99 // Delete it. |
| 89 host_scanner_operation_->RemoveObserver(this); | 100 host_scanner_operation_->RemoveObserver(this); |
| 90 host_scanner_operation_.reset(); | 101 host_scanner_operation_.reset(); |
| 91 } | 102 } |
| 92 } | 103 } |
| 93 | 104 |
| 94 } // namespace tether | 105 } // namespace tether |
| 95 | 106 |
| 96 } // namespace chromeos | 107 } // namespace chromeos |
| OLD | NEW |