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 30 matching lines...) Expand all Loading... |
54 } | 54 } |
55 | 55 |
56 ExtensionFunctionRegistry::FactoryEntry::FactoryEntry( | 56 ExtensionFunctionRegistry::FactoryEntry::FactoryEntry( |
57 ExtensionFunctionFactory factory, | 57 ExtensionFunctionFactory factory, |
58 const char* function_name, | 58 const char* function_name, |
59 extensions::functions::HistogramValue histogram_value) | 59 extensions::functions::HistogramValue histogram_value) |
60 : factory_(factory), | 60 : factory_(factory), |
61 function_name_(function_name), | 61 function_name_(function_name), |
62 histogram_value_(histogram_value) { | 62 histogram_value_(histogram_value) { |
63 } | 63 } |
OLD | NEW |