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

Side by Side Diff: ios/web/webui/web_ui_ios_controller_factory_registry.cc

Issue 2733283002: Require explicit selection of traits for LazyInstance (Closed)
Patch Set: l10n again Created 3 years, 9 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 "ios/web/webui/web_ui_ios_controller_factory_registry.h" 5 #include "ios/web/webui/web_ui_ios_controller_factory_registry.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "ios/web/public/webui/web_ui_ios_controller.h" 11 #include "ios/web/public/webui/web_ui_ios_controller.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 #include "url/url_constants.h" 13 #include "url/url_constants.h"
14 14
15 namespace web { 15 namespace web {
16 16
17 base::LazyInstance<std::vector<WebUIIOSControllerFactory*>> g_factories = 17 base::LazyInstance<std::vector<WebUIIOSControllerFactory*>>::DestructorAtExit
18 LAZY_INSTANCE_INITIALIZER; 18 g_factories = LAZY_INSTANCE_INITIALIZER;
19 19
20 void WebUIIOSControllerFactory::RegisterFactory( 20 void WebUIIOSControllerFactory::RegisterFactory(
21 WebUIIOSControllerFactory* factory) { 21 WebUIIOSControllerFactory* factory) {
22 g_factories.Pointer()->push_back(factory); 22 g_factories.Pointer()->push_back(factory);
23 } 23 }
24 24
25 WebUIIOSControllerFactoryRegistry* 25 WebUIIOSControllerFactoryRegistry*
26 WebUIIOSControllerFactoryRegistry::GetInstance() { 26 WebUIIOSControllerFactoryRegistry::GetInstance() {
27 return base::Singleton<WebUIIOSControllerFactoryRegistry>::get(); 27 return base::Singleton<WebUIIOSControllerFactoryRegistry>::get();
28 } 28 }
(...skipping 11 matching lines...) Expand all
40 return nullptr; 40 return nullptr;
41 } 41 }
42 42
43 WebUIIOSControllerFactoryRegistry::WebUIIOSControllerFactoryRegistry() { 43 WebUIIOSControllerFactoryRegistry::WebUIIOSControllerFactoryRegistry() {
44 } 44 }
45 45
46 WebUIIOSControllerFactoryRegistry::~WebUIIOSControllerFactoryRegistry() { 46 WebUIIOSControllerFactoryRegistry::~WebUIIOSControllerFactoryRegistry() {
47 } 47 }
48 48
49 } // namespace web 49 } // namespace web
OLDNEW
« no previous file with comments | « ios/chrome/browser/update_client/ios_chrome_update_query_params_delegate.cc ('k') | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698