| 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/shell/test/shell_apitest.h" | 5 #include "extensions/shell/test/shell_apitest.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/threading/thread_restrictions.h" | 9 #include "base/threading/thread_restrictions.h" |
| 10 #include "content/public/browser/notification_service.h" | 10 #include "content/public/browser/notification_service.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 return false; | 49 return false; |
| 50 } | 50 } |
| 51 | 51 |
| 52 return true; | 52 return true; |
| 53 } | 53 } |
| 54 | 54 |
| 55 void ShellApiTest::UnloadApp(const Extension* app) { | 55 void ShellApiTest::UnloadApp(const Extension* app) { |
| 56 ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context()); | 56 ExtensionRegistry* registry = ExtensionRegistry::Get(browser_context()); |
| 57 ASSERT_TRUE(registry->RemoveEnabled(app->id())); | 57 ASSERT_TRUE(registry->RemoveEnabled(app->id())); |
| 58 | 58 |
| 59 UnloadedExtensionInfo::Reason reason(UnloadedExtensionInfo::REASON_DISABLE); | 59 UnloadedExtensionReason reason(UnloadedExtensionReason::DISABLE); |
| 60 registry->TriggerOnUnloaded(app, reason); | 60 registry->TriggerOnUnloaded(app, reason); |
| 61 | 61 |
| 62 content::NotificationService::current()->Notify( | 62 content::NotificationService::current()->Notify( |
| 63 extensions::NOTIFICATION_EXTENSION_REMOVED, | 63 extensions::NOTIFICATION_EXTENSION_REMOVED, |
| 64 content::Source<content::BrowserContext>(browser_context()), | 64 content::Source<content::BrowserContext>(browser_context()), |
| 65 content::Details<const Extension>(app)); | 65 content::Details<const Extension>(app)); |
| 66 } | 66 } |
| 67 | 67 |
| 68 } // namespace extensions | 68 } // namespace extensions |
| OLD | NEW |