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

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

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT 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
« no previous file with comments | « ios/web/net/cert_store_impl.cc ('k') | ios/web/webui/web_ui_ios_controller_factory_registry.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef IOS_WEB_WEBUI_WEB_UI_IOS_CONTROLLER_FACTORY_REGISTRY_H_ 5 #ifndef IOS_WEB_WEBUI_WEB_UI_IOS_CONTROLLER_FACTORY_REGISTRY_H_
6 #define IOS_WEB_WEBUI_WEB_UI_IOS_CONTROLLER_FACTORY_REGISTRY_H_ 6 #define IOS_WEB_WEBUI_WEB_UI_IOS_CONTROLLER_FACTORY_REGISTRY_H_
7 7
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "ios/public/provider/web/web_ui_ios_controller_factory.h" 9 #include "ios/public/provider/web/web_ui_ios_controller_factory.h"
10 10
11 namespace web { 11 namespace web {
12 12
13 // A singleton which holds on to all the registered WebUIIOSControllerFactory 13 // A singleton which holds on to all the registered WebUIIOSControllerFactory
14 // instances. 14 // instances.
15 class WebUIIOSControllerFactoryRegistry : public WebUIIOSControllerFactory { 15 class WebUIIOSControllerFactoryRegistry : public WebUIIOSControllerFactory {
16 public: 16 public:
17 static WebUIIOSControllerFactoryRegistry* GetInstance(); 17 static WebUIIOSControllerFactoryRegistry* GetInstance();
18 18
19 // WebUIIOSControllerFactory implementation. Each method loops through the 19 // WebUIIOSControllerFactory implementation. Each method loops through the
20 // same method on all the factories. 20 // same method on all the factories.
21 WebUIIOSController* CreateWebUIIOSControllerForURL( 21 WebUIIOSController* CreateWebUIIOSControllerForURL(
22 WebUIIOS* web_ui, 22 WebUIIOS* web_ui,
23 const GURL& url) const override; 23 const GURL& url) const override;
24 24
25 private: 25 private:
26 friend struct DefaultSingletonTraits<WebUIIOSControllerFactoryRegistry>; 26 friend struct base::DefaultSingletonTraits<WebUIIOSControllerFactoryRegistry>;
27 27
28 WebUIIOSControllerFactoryRegistry(); 28 WebUIIOSControllerFactoryRegistry();
29 ~WebUIIOSControllerFactoryRegistry() override; 29 ~WebUIIOSControllerFactoryRegistry() override;
30 30
31 DISALLOW_COPY_AND_ASSIGN(WebUIIOSControllerFactoryRegistry); 31 DISALLOW_COPY_AND_ASSIGN(WebUIIOSControllerFactoryRegistry);
32 }; 32 };
33 33
34 } // namespace web 34 } // namespace web
35 35
36 #endif // IOS_WEB_WEBUI_WEB_UI_IOS_CONTROLLER_FACTORY_REGISTRY_H_ 36 #endif // IOS_WEB_WEBUI_WEB_UI_IOS_CONTROLLER_FACTORY_REGISTRY_H_
OLDNEW
« no previous file with comments | « ios/web/net/cert_store_impl.cc ('k') | ios/web/webui/web_ui_ios_controller_factory_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698