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 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 "EasyUnlock.AuthProximity.TransmitPowerDelta", 127, 1); | 551 "EasyUnlock.AuthProximity.TransmitPowerDelta", 127, 1); |
553 histogram_tester.ExpectUniqueSample( | 552 histogram_tester.ExpectUniqueSample( |
554 "EasyUnlock.AuthProximity.TimeSinceLastZeroRssi", | 553 "EasyUnlock.AuthProximity.TimeSinceLastZeroRssi", |
555 base::TimeDelta::FromSeconds(10).InMilliseconds(), 1); | 554 base::TimeDelta::FromSeconds(10).InMilliseconds(), 1); |
556 histogram_tester.ExpectUniqueSample( | 555 histogram_tester.ExpectUniqueSample( |
557 "EasyUnlock.AuthProximity.RemoteDeviceModelHash", | 556 "EasyUnlock.AuthProximity.RemoteDeviceModelHash", |
558 -1808066424 /* hash of "Unknown" */, 1); | 557 -1808066424 /* hash of "Unknown" */, 1); |
559 } | 558 } |
560 | 559 |
561 } // namespace proximity_auth | 560 } // namespace proximity_auth |
OLD | NEW |