Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Unified Diff: chromeos/components/tether/host_scanner_operation.cc

Issue 2844973002: [CrOS Tether] Create TetherHostResponseRecorder, which records ConnectTetheringResponses and Tether… (Closed)
Patch Set: Changed "Connectable" wording to "Connected". Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromeos/components/tether/host_scanner_operation.cc
diff --git a/chromeos/components/tether/host_scanner_operation.cc b/chromeos/components/tether/host_scanner_operation.cc
index 3cef889755f9ea7e5b8f15d8bbf58412a367db7a..3f9d016400f658ef660757b6ad5d8456226c1e7a 100644
--- a/chromeos/components/tether/host_scanner_operation.cc
+++ b/chromeos/components/tether/host_scanner_operation.cc
@@ -7,6 +7,7 @@
#include "chromeos/components/tether/host_scan_device_prioritizer.h"
#include "chromeos/components/tether/message_wrapper.h"
#include "chromeos/components/tether/proto/tether.pb.h"
+#include "chromeos/components/tether/tether_host_response_recorder.h"
#include "components/proximity_auth/logging/logging.h"
namespace chromeos {
@@ -64,12 +65,14 @@ std::unique_ptr<HostScannerOperation>
HostScannerOperation::Factory::NewInstance(
const std::vector<cryptauth::RemoteDevice>& devices_to_connect,
BleConnectionManager* connection_manager,
- HostScanDevicePrioritizer* host_scan_device_prioritizer) {
+ HostScanDevicePrioritizer* host_scan_device_prioritizer,
+ TetherHostResponseRecorder* tether_host_response_recorder) {
if (!factory_instance_) {
factory_instance_ = new Factory();
}
return factory_instance_->BuildInstance(
- devices_to_connect, connection_manager, host_scan_device_prioritizer);
+ devices_to_connect, connection_manager, host_scan_device_prioritizer,
+ tether_host_response_recorder);
}
// static
@@ -81,9 +84,11 @@ std::unique_ptr<HostScannerOperation>
HostScannerOperation::Factory::BuildInstance(
const std::vector<cryptauth::RemoteDevice>& devices_to_connect,
BleConnectionManager* connection_manager,
- HostScanDevicePrioritizer* host_scan_device_prioritizer) {
+ HostScanDevicePrioritizer* host_scan_device_prioritizer,
+ TetherHostResponseRecorder* tether_host_response_recorder) {
return base::MakeUnique<HostScannerOperation>(
- devices_to_connect, connection_manager, host_scan_device_prioritizer);
+ devices_to_connect, connection_manager, host_scan_device_prioritizer,
+ tether_host_response_recorder);
}
HostScannerOperation::ScannedDeviceInfo::ScannedDeviceInfo(
@@ -107,11 +112,12 @@ bool operator==(const HostScannerOperation::ScannedDeviceInfo& first,
HostScannerOperation::HostScannerOperation(
const std::vector<cryptauth::RemoteDevice>& devices_to_connect,
BleConnectionManager* connection_manager,
- HostScanDevicePrioritizer* host_scan_device_prioritizer)
+ HostScanDevicePrioritizer* host_scan_device_prioritizer,
+ TetherHostResponseRecorder* tether_host_response_recorder)
: MessageTransferOperation(
PrioritizeDevices(devices_to_connect, host_scan_device_prioritizer),
connection_manager),
- host_scan_device_prioritizer_(host_scan_device_prioritizer) {}
+ tether_host_response_recorder_(tether_host_response_recorder) {}
HostScannerOperation::~HostScannerOperation() {}
@@ -166,7 +172,7 @@ void HostScannerOperation::OnMessageReceived(
<< "indicates that tethering is available. set_up_required = "
<< set_up_required;
- host_scan_device_prioritizer_->RecordSuccessfulTetherAvailabilityResponse(
+ tether_host_response_recorder_->RecordSuccessfulTetherAvailabilityResponse(
remote_device);
scanned_device_list_so_far_.push_back(ScannedDeviceInfo(
« no previous file with comments | « chromeos/components/tether/host_scanner_operation.h ('k') | chromeos/components/tether/host_scanner_operation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698