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 "chrome/browser/signin/easy_unlock_app_manager.h" | 5 #include "chrome/browser/signin/easy_unlock_app_manager.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "testing/gtest/include/gtest/gtest.h" | 32 #include "testing/gtest/include/gtest/gtest.h" |
33 | 33 |
34 #if defined(OS_CHROMEOS) | 34 #if defined(OS_CHROMEOS) |
35 #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" | 35 #include "chrome/browser/chromeos/login/users/scoped_test_user_manager.h" |
36 #include "chrome/browser/chromeos/settings/cros_settings.h" | 36 #include "chrome/browser/chromeos/settings/cros_settings.h" |
37 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 37 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
38 #endif | 38 #endif |
39 | 39 |
40 namespace easy_unlock_private_api = extensions::api::easy_unlock_private; | 40 namespace easy_unlock_private_api = extensions::api::easy_unlock_private; |
41 namespace screenlock_private_api = extensions::api::screenlock_private; | 41 namespace screenlock_private_api = extensions::api::screenlock_private; |
42 namespace app_runtime_api = extensions::core_api::app_runtime; | 42 namespace app_runtime_api = extensions::api::app_runtime; |
43 | 43 |
44 namespace { | 44 namespace { |
45 | 45 |
46 // Sets |*value| to true, also verifying that the value was not previously set. | 46 // Sets |*value| to true, also verifying that the value was not previously set. |
47 // Used in tests for verifying that a callback was called. | 47 // Used in tests for verifying that a callback was called. |
48 void VerifyFalseAndSetToTrue(bool* value) { | 48 void VerifyFalseAndSetToTrue(bool* value) { |
49 EXPECT_FALSE(*value); | 49 EXPECT_FALSE(*value); |
50 *value = true; | 50 *value = true; |
51 } | 51 } |
52 | 52 |
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 extension_misc::kEasyUnlockAppId); | 631 extension_misc::kEasyUnlockAppId); |
632 app_manager_->DisableAppIfLoaded(); | 632 app_manager_->DisableAppIfLoaded(); |
633 | 633 |
634 ASSERT_EQ(0u, event_consumer_.auth_attempted_count()); | 634 ASSERT_EQ(0u, event_consumer_.auth_attempted_count()); |
635 | 635 |
636 EXPECT_FALSE(app_manager_->SendAuthAttemptEvent()); | 636 EXPECT_FALSE(app_manager_->SendAuthAttemptEvent()); |
637 EXPECT_EQ(0u, event_consumer_.auth_attempted_count()); | 637 EXPECT_EQ(0u, event_consumer_.auth_attempted_count()); |
638 } | 638 } |
639 | 639 |
640 } // namespace | 640 } // namespace |
OLD | NEW |