| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/extension_web_ui_override_registrar.h" | 5 #include "chrome/browser/extensions/extension_web_ui_override_registrar.h" |
| 6 | 6 |
| 7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "chrome/browser/chrome_notification_types.h" | 8 #include "chrome/browser/chrome_notification_types.h" |
| 9 #include "chrome/browser/extensions/extension_web_ui.h" | 9 #include "chrome/browser/extensions/extension_web_ui.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 } else if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) { | 40 } else if (type == chrome::NOTIFICATION_EXTENSION_UNLOADED) { |
| 41 const Extension* extension = | 41 const Extension* extension = |
| 42 content::Details<UnloadedExtensionInfo>(details)->extension; | 42 content::Details<UnloadedExtensionInfo>(details)->extension; |
| 43 ExtensionWebUI::UnregisterChromeURLOverrides( | 43 ExtensionWebUI::UnregisterChromeURLOverrides( |
| 44 profile_, URLOverrides::GetChromeURLOverrides(extension)); | 44 profile_, URLOverrides::GetChromeURLOverrides(extension)); |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 static base::LazyInstance< | 48 static base::LazyInstance< |
| 49 ProfileKeyedAPIFactory<ExtensionWebUIOverrideRegistrar> > | 49 BrowserContextKeyedAPIFactory<ExtensionWebUIOverrideRegistrar> > g_factory = |
| 50 g_factory = LAZY_INSTANCE_INITIALIZER; | 50 LAZY_INSTANCE_INITIALIZER; |
| 51 | 51 |
| 52 // static | 52 // static |
| 53 ProfileKeyedAPIFactory<ExtensionWebUIOverrideRegistrar>* | 53 BrowserContextKeyedAPIFactory<ExtensionWebUIOverrideRegistrar>* |
| 54 ExtensionWebUIOverrideRegistrar::GetFactoryInstance() { | 54 ExtensionWebUIOverrideRegistrar::GetFactoryInstance() { |
| 55 return g_factory.Pointer(); | 55 return g_factory.Pointer(); |
| 56 } | 56 } |
| 57 | 57 |
| 58 } // namespace extensions | 58 } // namespace extensions |
| OLD | NEW |