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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 void OnExtensionLoaded(content::BrowserContext* browser_context, | 106 void OnExtensionLoaded(content::BrowserContext* browser_context, |
107 const extensions::Extension* extension) override { | 107 const extensions::Extension* extension) override { |
108 ASSERT_FALSE(loaded_); | 108 ASSERT_FALSE(loaded_); |
109 ASSERT_EQ(extension_id_, extension->id()); | 109 ASSERT_EQ(extension_id_, extension->id()); |
110 loaded_ = true; | 110 loaded_ = true; |
111 } | 111 } |
112 | 112 |
113 void OnExtensionUnloaded( | 113 void OnExtensionUnloaded( |
114 content::BrowserContext* browser_context, | 114 content::BrowserContext* browser_context, |
115 const extensions::Extension* extension, | 115 const extensions::Extension* extension, |
116 extensions::UnloadedExtensionInfo::Reason reason) override { | 116 extensions::UnloadedExtensionReason reason) override { |
117 ASSERT_FALSE(unloaded_); | 117 ASSERT_FALSE(unloaded_); |
118 ASSERT_EQ(extension_id_, extension->id()); | 118 ASSERT_EQ(extension_id_, extension->id()); |
119 unloaded_ = true; | 119 unloaded_ = true; |
120 } | 120 } |
121 | 121 |
122 // Whether the extensino was unloaded and loaded during |this| lifetime. | 122 // Whether the extensino was unloaded and loaded during |this| lifetime. |
123 bool HasReloaded() const { return loaded_ && unloaded_; } | 123 bool HasReloaded() const { return loaded_ && unloaded_; } |
124 | 124 |
125 private: | 125 private: |
126 Profile* profile_; | 126 Profile* profile_; |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 extension_misc::kEasyUnlockAppId); | 635 extension_misc::kEasyUnlockAppId); |
636 app_manager_->DisableAppIfLoaded(); | 636 app_manager_->DisableAppIfLoaded(); |
637 | 637 |
638 ASSERT_EQ(0u, event_consumer_.auth_attempted_count()); | 638 ASSERT_EQ(0u, event_consumer_.auth_attempted_count()); |
639 | 639 |
640 EXPECT_FALSE(app_manager_->SendAuthAttemptEvent()); | 640 EXPECT_FALSE(app_manager_->SendAuthAttemptEvent()); |
641 EXPECT_EQ(0u, event_consumer_.auth_attempted_count()); | 641 EXPECT_EQ(0u, event_consumer_.auth_attempted_count()); |
642 } | 642 } |
643 | 643 |
644 } // namespace | 644 } // namespace |
OLD | NEW |