OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/proximity_auth/proximity_monitor_impl.h" | 5 #include "components/proximity_auth/proximity_monitor_impl.h" |
6 | 6 |
7 #include "base/macros.h" | 7 #include "base/macros.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/run_loop.h" | |
11 #include "base/test/histogram_tester.h" | 10 #include "base/test/histogram_tester.h" |
12 #include "base/test/simple_test_tick_clock.h" | 11 #include "base/test/simple_test_tick_clock.h" |
13 #include "base/test/test_simple_task_runner.h" | 12 #include "base/test/test_simple_task_runner.h" |
14 #include "base/thread_task_runner_handle.h" | 13 #include "base/thread_task_runner_handle.h" |
15 #include "base/time/time.h" | 14 #include "base/time/time.h" |
16 #include "components/proximity_auth/logging/logging.h" | 15 #include "components/proximity_auth/logging/logging.h" |
17 #include "components/proximity_auth/proximity_monitor_observer.h" | 16 #include "components/proximity_auth/proximity_monitor_observer.h" |
18 #include "components/proximity_auth/remote_device.h" | 17 #include "components/proximity_auth/remote_device.h" |
19 #include "device/bluetooth/bluetooth_adapter_factory.h" | 18 #include "device/bluetooth/bluetooth_adapter_factory.h" |
20 #include "device/bluetooth/test/mock_bluetooth_adapter.h" | 19 #include "device/bluetooth/test/mock_bluetooth_adapter.h" |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 "EasyUnlock.AuthProximity.TransmitPowerDelta", 127, 1); | 541 "EasyUnlock.AuthProximity.TransmitPowerDelta", 127, 1); |
543 histogram_tester.ExpectUniqueSample( | 542 histogram_tester.ExpectUniqueSample( |
544 "EasyUnlock.AuthProximity.TimeSinceLastZeroRssi", | 543 "EasyUnlock.AuthProximity.TimeSinceLastZeroRssi", |
545 base::TimeDelta::FromSeconds(10).InMilliseconds(), 1); | 544 base::TimeDelta::FromSeconds(10).InMilliseconds(), 1); |
546 histogram_tester.ExpectUniqueSample( | 545 histogram_tester.ExpectUniqueSample( |
547 "EasyUnlock.AuthProximity.RemoteDeviceModelHash", | 546 "EasyUnlock.AuthProximity.RemoteDeviceModelHash", |
548 -1808066424 /* hash of "Unknown" */, 1); | 547 -1808066424 /* hash of "Unknown" */, 1); |
549 } | 548 } |
550 | 549 |
551 } // namespace proximity_auth | 550 } // namespace proximity_auth |
OLD | NEW |