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

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

Issue 2819383002: [CrOS Tether] Update NetworkState to include tether properties and integrate into NetworkStateHandl… (Closed)
Patch Set: Fix comments, add style change, change a LOG to a DCHECK. 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 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), 85 : HostScanner(nullptr, nullptr, nullptr, nullptr, nullptr, nullptr),
86 num_scans_started_(0) {} 86 num_scans_started_(0) {}
87 ~FakeHostScanner() override {} 87 ~FakeHostScanner() override {}
88 88
89 void StartScan() override { num_scans_started_++; } 89 void StartScan() override { num_scans_started_++; }
90 90
91 int num_scans_started() { return num_scans_started_; } 91 int num_scans_started() { return num_scans_started_; }
92 92
93 private: 93 private:
94 int num_scans_started_; 94 int num_scans_started_;
95 }; 95 };
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 test_delegate_->set_are_tether_hosts_synced(false); 221 test_delegate_->set_are_tether_hosts_synced(false);
222 host_scan_scheduler_->OnSyncFinished( 222 host_scan_scheduler_->OnSyncFinished(
223 cryptauth::CryptAuthDeviceManager::SyncResult::SUCCESS, 223 cryptauth::CryptAuthDeviceManager::SyncResult::SUCCESS,
224 cryptauth::CryptAuthDeviceManager::DeviceChangeResult::UNCHANGED); 224 cryptauth::CryptAuthDeviceManager::DeviceChangeResult::UNCHANGED);
225 EXPECT_EQ(1, fake_host_scanner_->num_scans_started()); 225 EXPECT_EQ(1, fake_host_scanner_->num_scans_started());
226 } 226 }
227 227
228 } // namespace tether 228 } // namespace tether
229 229
230 } // namespace chromeos 230 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698