Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: extensions/browser/extension_function_registry.cc

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl format Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698