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/cryptauth/cryptauth_enrollment_manager.h" | 5 #include "components/proximity_auth/cryptauth/cryptauth_enrollment_manager.h" |
6 | 6 |
7 #include "base/base64url.h" | 7 #include "base/base64url.h" |
| 8 #include "base/macros.h" |
8 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
9 #include "base/prefs/testing_pref_service.h" | 10 #include "base/prefs/testing_pref_service.h" |
10 #include "base/test/simple_test_clock.h" | 11 #include "base/test/simple_test_clock.h" |
11 #include "base/time/clock.h" | 12 #include "base/time/clock.h" |
12 #include "base/time/time.h" | 13 #include "base/time/time.h" |
13 #include "components/proximity_auth/cryptauth/cryptauth_enroller.h" | 14 #include "components/proximity_auth/cryptauth/cryptauth_enroller.h" |
14 #include "components/proximity_auth/cryptauth/fake_cryptauth_gcm_manager.h" | 15 #include "components/proximity_auth/cryptauth/fake_cryptauth_gcm_manager.h" |
15 #include "components/proximity_auth/cryptauth/fake_secure_message_delegate.h" | 16 #include "components/proximity_auth/cryptauth/fake_secure_message_delegate.h" |
16 #include "components/proximity_auth/cryptauth/mock_sync_scheduler.h" | 17 #include "components/proximity_auth/cryptauth/mock_sync_scheduler.h" |
17 #include "components/proximity_auth/cryptauth/pref_names.h" | 18 #include "components/proximity_auth/cryptauth/pref_names.h" |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 // Simulate receiving a GCM push message, forcing the device to re-enroll. | 458 // Simulate receiving a GCM push message, forcing the device to re-enroll. |
458 gcm_manager_.PushReenrollMessage(); | 459 gcm_manager_.PushReenrollMessage(); |
459 auto completion_callback = | 460 auto completion_callback = |
460 FireSchedulerForEnrollment(cryptauth::INVOCATION_REASON_SERVER_INITIATED); | 461 FireSchedulerForEnrollment(cryptauth::INVOCATION_REASON_SERVER_INITIATED); |
461 | 462 |
462 EXPECT_CALL(*this, OnEnrollmentFinishedProxy(true)); | 463 EXPECT_CALL(*this, OnEnrollmentFinishedProxy(true)); |
463 completion_callback.Run(true); | 464 completion_callback.Run(true); |
464 } | 465 } |
465 | 466 |
466 } // namespace proximity_auth | 467 } // namespace proximity_auth |
OLD | NEW |