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/extensions/extension_web_ui.h" | 8 #include "chrome/browser/extensions/extension_web_ui.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "extensions/browser/extension_registry.h" | 10 #include "extensions/browser/extension_registry.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 Profile::FromBrowserContext(browser_context), | 55 Profile::FromBrowserContext(browser_context), |
56 URLOverrides::GetChromeURLOverrides(extension)); | 56 URLOverrides::GetChromeURLOverrides(extension)); |
57 } | 57 } |
58 | 58 |
59 void ExtensionWebUIOverrideRegistrar::OnExtensionSystemReady( | 59 void ExtensionWebUIOverrideRegistrar::OnExtensionSystemReady( |
60 content::BrowserContext* context) { | 60 content::BrowserContext* context) { |
61 ExtensionWebUI::ValidateChromeURLOverrides( | 61 ExtensionWebUI::ValidateChromeURLOverrides( |
62 Profile::FromBrowserContext(context)); | 62 Profile::FromBrowserContext(context)); |
63 } | 63 } |
64 | 64 |
65 static base::LazyInstance< | 65 static base::LazyInstance<BrowserContextKeyedAPIFactory< |
66 BrowserContextKeyedAPIFactory<ExtensionWebUIOverrideRegistrar> > g_factory = | 66 ExtensionWebUIOverrideRegistrar>>::DestructorAtExit g_factory = |
67 LAZY_INSTANCE_INITIALIZER; | 67 LAZY_INSTANCE_INITIALIZER; |
68 | 68 |
69 // static | 69 // static |
70 BrowserContextKeyedAPIFactory<ExtensionWebUIOverrideRegistrar>* | 70 BrowserContextKeyedAPIFactory<ExtensionWebUIOverrideRegistrar>* |
71 ExtensionWebUIOverrideRegistrar::GetFactoryInstance() { | 71 ExtensionWebUIOverrideRegistrar::GetFactoryInstance() { |
72 return g_factory.Pointer(); | 72 return g_factory.Pointer(); |
73 } | 73 } |
74 | 74 |
75 } // namespace extensions | 75 } // namespace extensions |
OLD | NEW |