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

Side by Side Diff: chromeos/components/tether/host_scanner.cc

Issue 2913313002: Tether: Persist if first-time setup is required to HostScanCache. (Closed)
Patch Set: khorimoto@ comments. Created 3 years, 6 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 unified diff | Download patch
OLDNEW
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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "chromeos/components/tether/device_id_tether_network_guid_map.h" 10 #include "chromeos/components/tether/device_id_tether_network_guid_map.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 const int32_t signal_strength = 160 const int32_t signal_strength =
161 status.has_connection_strength() 161 status.has_connection_strength()
162 ? ForceBetweenZeroAndOneHundred( 162 ? ForceBetweenZeroAndOneHundred(
163 kAndroidTetherHostToChromeOSSignalStrengthMultiplier * 163 kAndroidTetherHostToChromeOSSignalStrengthMultiplier *
164 status.connection_strength()) 164 status.connection_strength())
165 : 100; 165 : 100;
166 166
167 host_scan_cache_->SetHostScanResult( 167 host_scan_cache_->SetHostScanResult(
168 device_id_tether_network_guid_map_->GetTetherNetworkGuidForDeviceId( 168 device_id_tether_network_guid_map_->GetTetherNetworkGuidForDeviceId(
169 remote_device.GetDeviceId()), 169 remote_device.GetDeviceId()),
170 remote_device.name, carrier, battery_percentage, signal_strength); 170 remote_device.name, carrier, battery_percentage, signal_strength,
171 scanned_device_info.setup_required);
171 } 172 }
172 173
173 } // namespace tether 174 } // namespace tether
174 175
175 } // namespace chromeos 176 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/components/tether/host_scan_cache_unittest.cc ('k') | chromeos/components/tether/host_scanner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698