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_device_manager.h" | 5 #include "components/proximity_auth/cryptauth/cryptauth_device_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/base64url.h" | 10 #include "base/base64url.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 #include "base/prefs/scoped_user_pref_update.h" | |
14 #include "base/prefs/testing_pref_service.h" | |
15 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
16 #include "base/test/simple_test_clock.h" | 14 #include "base/test/simple_test_clock.h" |
| 15 #include "components/prefs/scoped_user_pref_update.h" |
| 16 #include "components/prefs/testing_pref_service.h" |
17 #include "components/proximity_auth/cryptauth/fake_cryptauth_gcm_manager.h" | 17 #include "components/proximity_auth/cryptauth/fake_cryptauth_gcm_manager.h" |
18 #include "components/proximity_auth/cryptauth/mock_cryptauth_client.h" | 18 #include "components/proximity_auth/cryptauth/mock_cryptauth_client.h" |
19 #include "components/proximity_auth/cryptauth/mock_sync_scheduler.h" | 19 #include "components/proximity_auth/cryptauth/mock_sync_scheduler.h" |
20 #include "components/proximity_auth/cryptauth/pref_names.h" | 20 #include "components/proximity_auth/cryptauth/pref_names.h" |
21 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
23 | 23 |
24 using ::testing::_; | 24 using ::testing::_; |
25 using ::testing::DoAll; | 25 using ::testing::DoAll; |
26 using ::testing::NiceMock; | 26 using ::testing::NiceMock; |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 CryptAuthDeviceManager::DeviceChangeResult::CHANGED)); | 596 CryptAuthDeviceManager::DeviceChangeResult::CHANGED)); |
597 success_callback_.Run(get_my_devices_response_); | 597 success_callback_.Run(get_my_devices_response_); |
598 | 598 |
599 ExpectUnlockKeysAndPrefAreEqual(std::vector<cryptauth::ExternalDeviceInfo>( | 599 ExpectUnlockKeysAndPrefAreEqual(std::vector<cryptauth::ExternalDeviceInfo>( |
600 1, get_my_devices_response_.devices(0)), | 600 1, get_my_devices_response_.devices(0)), |
601 device_manager_->unlock_keys(), | 601 device_manager_->unlock_keys(), |
602 pref_service_); | 602 pref_service_); |
603 } | 603 } |
604 | 604 |
605 } // namespace proximity_auth | 605 } // namespace proximity_auth |
OLD | NEW |