| 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 "extensions/browser/test_extension_registry_observer.h" | 5 #include "extensions/browser/test_extension_registry_observer.h" |
| 6 | 6 |
| 7 #include "content/public/test/test_utils.h" | 7 #include "content/public/test/test_utils.h" |
| 8 #include "extensions/browser/extension_registry.h" | 8 #include "extensions/browser/extension_registry.h" |
| 9 | 9 |
| 10 namespace extensions { | 10 namespace extensions { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 const Extension* extension, | 73 const Extension* extension, |
| 74 bool is_update, | 74 bool is_update, |
| 75 bool from_ephemeral, | 75 bool from_ephemeral, |
| 76 const std::string& old_name) { | 76 const std::string& old_name) { |
| 77 if (extension->id() == extension_id_) | 77 if (extension->id() == extension_id_) |
| 78 will_be_installed_waiter_->OnObserved(); | 78 will_be_installed_waiter_->OnObserved(); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void TestExtensionRegistryObserver::OnExtensionUninstalled( | 81 void TestExtensionRegistryObserver::OnExtensionUninstalled( |
| 82 content::BrowserContext* browser_context, | 82 content::BrowserContext* browser_context, |
| 83 const Extension* extension) { | 83 const Extension* extension, |
| 84 extensions::UninstallReason reason) { |
| 84 if (extension->id() == extension_id_) | 85 if (extension->id() == extension_id_) |
| 85 uninstalled_waiter_->OnObserved(); | 86 uninstalled_waiter_->OnObserved(); |
| 86 } | 87 } |
| 87 | 88 |
| 88 void TestExtensionRegistryObserver::OnExtensionLoaded( | 89 void TestExtensionRegistryObserver::OnExtensionLoaded( |
| 89 content::BrowserContext* browser_context, | 90 content::BrowserContext* browser_context, |
| 90 const Extension* extension) { | 91 const Extension* extension) { |
| 91 if (extension->id() == extension_id_) | 92 if (extension->id() == extension_id_) |
| 92 loaded_waiter_->OnObserved(); | 93 loaded_waiter_->OnObserved(); |
| 93 } | 94 } |
| 94 | 95 |
| 95 void TestExtensionRegistryObserver::OnExtensionUnloaded( | 96 void TestExtensionRegistryObserver::OnExtensionUnloaded( |
| 96 content::BrowserContext* browser_context, | 97 content::BrowserContext* browser_context, |
| 97 const Extension* extension, | 98 const Extension* extension, |
| 98 UnloadedExtensionInfo::Reason reason) { | 99 UnloadedExtensionInfo::Reason reason) { |
| 99 if (extension->id() == extension_id_) | 100 if (extension->id() == extension_id_) |
| 100 unloaded_waiter_->OnObserved(); | 101 unloaded_waiter_->OnObserved(); |
| 101 } | 102 } |
| 102 | 103 |
| 103 } // namespace extensions | 104 } // namespace extensions |
| OLD | NEW |