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

Side by Side Diff: webkit/plugins/ppapi/ppapi_interface_factory.cc

Issue 8491043: Allow linker initialization of lazy instance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: willchan comments + rebase Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/plugins/ppapi/ppapi_interface_factory.h" 5 #include "webkit/plugins/ppapi/ppapi_interface_factory.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 namespace webkit { 11 namespace webkit {
12 namespace ppapi { 12 namespace ppapi {
13 13
14 base::LazyInstance<PpapiInterfaceFactoryManager> 14 base::LazyInstance<PpapiInterfaceFactoryManager>
15 g_ppapi_interface_factory_manager(base::LINKER_INITIALIZED); 15 g_ppapi_interface_factory_manager = LAZY_INSTANCE_INITIALIZER;
16 16
17 PpapiInterfaceFactoryManager::PpapiInterfaceFactoryManager() { 17 PpapiInterfaceFactoryManager::PpapiInterfaceFactoryManager() {
18 } 18 }
19 19
20 PpapiInterfaceFactoryManager::~PpapiInterfaceFactoryManager() { 20 PpapiInterfaceFactoryManager::~PpapiInterfaceFactoryManager() {
21 } 21 }
22 22
23 void PpapiInterfaceFactoryManager::RegisterFactory(InterfaceFactory* factory) { 23 void PpapiInterfaceFactoryManager::RegisterFactory(InterfaceFactory* factory) {
24 DCHECK(std::find(interface_factory_list_.begin(), 24 DCHECK(std::find(interface_factory_list_.begin(),
25 interface_factory_list_.end(), factory) == 25 interface_factory_list_.end(), factory) ==
(...skipping 27 matching lines...) Expand all
53 } 53 }
54 54
55 // static 55 // static
56 PpapiInterfaceFactoryManager* PpapiInterfaceFactoryManager::GetInstance() { 56 PpapiInterfaceFactoryManager* PpapiInterfaceFactoryManager::GetInstance() {
57 return &g_ppapi_interface_factory_manager.Get(); 57 return &g_ppapi_interface_factory_manager.Get();
58 } 58 }
59 59
60 } // namespace ppapi 60 } // namespace ppapi
61 } // namespace webkit 61 } // namespace webkit
62 62
OLDNEW
« no previous file with comments | « webkit/plugins/npapi/webplugin_ime_win.cc ('k') | webkit/tools/test_shell/simple_clipboard_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698