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

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

Issue 2844973002: [CrOS Tether] Create TetherHostResponseRecorder, which records ConnectTetheringResponses and Tether… (Closed)
Patch Set: Changed "Connectable" wording to "Connected". Created 3 years, 7 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_scan_scheduler.h" 5 #include "chromeos/components/tether/host_scan_scheduler.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "chromeos/components/tether/host_scanner.h" 8 #include "chromeos/components/tether/host_scanner.h"
9 #include "chromeos/dbus/power_manager_client.h" 9 #include "chromeos/dbus/power_manager_client.h"
10 #include "chromeos/login/login_state.h" 10 #include "chromeos/login/login_state.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 HostScanScheduler* observer_; 76 HostScanScheduler* observer_;
77 bool is_authenticated_user_logged_in; 77 bool is_authenticated_user_logged_in;
78 bool is_network_connected_or_connecting; 78 bool is_network_connected_or_connecting;
79 bool are_tether_hosts_synced; 79 bool are_tether_hosts_synced;
80 }; 80 };
81 81
82 class FakeHostScanner : public HostScanner { 82 class FakeHostScanner : public HostScanner {
83 public: 83 public:
84 FakeHostScanner() 84 FakeHostScanner()
85 : HostScanner(nullptr, nullptr, nullptr, nullptr, nullptr, nullptr), 85 : HostScanner(nullptr,
86 nullptr,
87 nullptr,
88 nullptr,
89 nullptr,
90 nullptr,
91 nullptr),
86 num_scans_started_(0) {} 92 num_scans_started_(0) {}
87 ~FakeHostScanner() override {} 93 ~FakeHostScanner() override {}
88 94
89 void StartScan() override { num_scans_started_++; } 95 void StartScan() override { num_scans_started_++; }
90 96
91 int num_scans_started() { return num_scans_started_; } 97 int num_scans_started() { return num_scans_started_; }
92 98
93 private: 99 private:
94 int num_scans_started_; 100 int num_scans_started_;
95 }; 101 };
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 test_delegate_->set_are_tether_hosts_synced(false); 227 test_delegate_->set_are_tether_hosts_synced(false);
222 host_scan_scheduler_->OnSyncFinished( 228 host_scan_scheduler_->OnSyncFinished(
223 cryptauth::CryptAuthDeviceManager::SyncResult::SUCCESS, 229 cryptauth::CryptAuthDeviceManager::SyncResult::SUCCESS,
224 cryptauth::CryptAuthDeviceManager::DeviceChangeResult::UNCHANGED); 230 cryptauth::CryptAuthDeviceManager::DeviceChangeResult::UNCHANGED);
225 EXPECT_EQ(1, fake_host_scanner_->num_scans_started()); 231 EXPECT_EQ(1, fake_host_scanner_->num_scans_started());
226 } 232 }
227 233
228 } // namespace tether 234 } // namespace tether
229 235
230 } // namespace chromeos 236 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/components/tether/host_scan_device_prioritizer_unittest.cc ('k') | chromeos/components/tether/host_scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698