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/extension_function_registry.h" | 5 #include "extensions/browser/extension_function_registry.h" |
6 | 6 |
7 #include "base/memory/singleton.h" | 7 #include "base/memory/singleton.h" |
8 #include "extensions/browser/extension_function.h" | 8 #include "extensions/browser/extension_function.h" |
9 #include "extensions/browser/extensions_browser_client.h" | 9 #include "extensions/browser/extensions_browser_client.h" |
10 | 10 |
11 // static | 11 // static |
12 ExtensionFunctionRegistry* ExtensionFunctionRegistry::GetInstance() { | 12 ExtensionFunctionRegistry* ExtensionFunctionRegistry::GetInstance() { |
13 return Singleton<ExtensionFunctionRegistry>::get(); | 13 return base::Singleton<ExtensionFunctionRegistry>::get(); |
14 } | 14 } |
15 | 15 |
16 ExtensionFunctionRegistry::ExtensionFunctionRegistry() { | 16 ExtensionFunctionRegistry::ExtensionFunctionRegistry() { |
17 extensions::ExtensionsBrowserClient* client = | 17 extensions::ExtensionsBrowserClient* client = |
18 extensions::ExtensionsBrowserClient::Get(); | 18 extensions::ExtensionsBrowserClient::Get(); |
19 if (client) { | 19 if (client) { |
20 client->RegisterExtensionFunctions(this); | 20 client->RegisterExtensionFunctions(this); |
21 } | 21 } |
22 } | 22 } |
23 | 23 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 } | 61 } |
62 | 62 |
63 ExtensionFunctionRegistry::FactoryEntry::FactoryEntry( | 63 ExtensionFunctionRegistry::FactoryEntry::FactoryEntry( |
64 ExtensionFunctionFactory factory, | 64 ExtensionFunctionFactory factory, |
65 const char* function_name, | 65 const char* function_name, |
66 extensions::functions::HistogramValue histogram_value) | 66 extensions::functions::HistogramValue histogram_value) |
67 : factory_(factory), | 67 : factory_(factory), |
68 function_name_(function_name), | 68 function_name_(function_name), |
69 histogram_value_(histogram_value) { | 69 histogram_value_(histogram_value) { |
70 } | 70 } |
OLD | NEW |