OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_screenlock_state_handler.h" | 5 #include "chrome/browser/signin/easy_unlock_screenlock_state_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } | 61 } |
62 | 62 |
63 void ShowUserPodCustomIcon( | 63 void ShowUserPodCustomIcon( |
64 const AccountId& account_id, | 64 const AccountId& account_id, |
65 const proximity_auth::ScreenlockBridge::UserPodCustomIconOptions& icon) | 65 const proximity_auth::ScreenlockBridge::UserPodCustomIconOptions& icon) |
66 override { | 66 override { |
67 ASSERT_TRUE(account_id_ == account_id) | 67 ASSERT_TRUE(account_id_ == account_id) |
68 << "account_id_=" << account_id_.Serialize() | 68 << "account_id_=" << account_id_.Serialize() |
69 << " != account_id=" << account_id.Serialize(); | 69 << " != account_id=" << account_id.Serialize(); |
70 ++show_icon_count_; | 70 ++show_icon_count_; |
71 last_custom_icon_ = icon.ToDictionaryValue().Pass(); | 71 last_custom_icon_ = icon.ToDictionaryValue(); |
72 ValidateCustomIcon(); | 72 ValidateCustomIcon(); |
73 } | 73 } |
74 | 74 |
75 void HideUserPodCustomIcon(const AccountId& account_id) override { | 75 void HideUserPodCustomIcon(const AccountId& account_id) override { |
76 ASSERT_TRUE(account_id_ == account_id) | 76 ASSERT_TRUE(account_id_ == account_id) |
77 << "account_id_=" << account_id_.Serialize() | 77 << "account_id_=" << account_id_.Serialize() |
78 << " != account_id=" << account_id.Serialize(); | 78 << " != account_id=" << account_id.Serialize(); |
79 last_custom_icon_.reset(); | 79 last_custom_icon_.reset(); |
80 } | 80 } |
81 | 81 |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 state_handler_->RecordClickOnLockIcon(); | 742 state_handler_->RecordClickOnLockIcon(); |
743 histogram_tester.ExpectTotalCount("EasyUnlock.TrialRun.Events", 4); | 743 histogram_tester.ExpectTotalCount("EasyUnlock.TrialRun.Events", 4); |
744 histogram_tester.ExpectBucketCount("EasyUnlock.TrialRun.Events", | 744 histogram_tester.ExpectBucketCount("EasyUnlock.TrialRun.Events", |
745 EASY_UNLOCK_TRIAL_RUN_EVENT_LAUNCHED, 1); | 745 EASY_UNLOCK_TRIAL_RUN_EVENT_LAUNCHED, 1); |
746 histogram_tester.ExpectBucketCount( | 746 histogram_tester.ExpectBucketCount( |
747 "EasyUnlock.TrialRun.Events", | 747 "EasyUnlock.TrialRun.Events", |
748 EASY_UNLOCK_TRIAL_RUN_EVENT_CLICKED_LOCK_ICON, 3); | 748 EASY_UNLOCK_TRIAL_RUN_EVENT_CLICKED_LOCK_ICON, 3); |
749 } | 749 } |
750 | 750 |
751 } // namespace | 751 } // namespace |
OLD | NEW |