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

Side by Side Diff: ppapi/proxy/interface_list.h

Issue 1099383002: Change ScopedPtrHashMap's 2nd template parameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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 | « media/cdm/aes_decryptor.h ('k') | ppapi/proxy/plugin_dispatcher.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 PPAPI_PROXY_INTERFACE_LIST_H_ 5 #ifndef PPAPI_PROXY_INTERFACE_LIST_H_
6 #define PPAPI_PROXY_INTERFACE_LIST_H_ 6 #define PPAPI_PROXY_INTERFACE_LIST_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 const void* const iface_; 74 const void* const iface_;
75 const Permission required_permission_; 75 const Permission required_permission_;
76 76
77 bool sent_to_uma_; 77 bool sent_to_uma_;
78 base::Lock sent_to_uma_lock_; 78 base::Lock sent_to_uma_lock_;
79 }; 79 };
80 // Give friendship for HashInterfaceName. 80 // Give friendship for HashInterfaceName.
81 friend class InterfaceInfo; 81 friend class InterfaceInfo;
82 82
83 typedef base::ScopedPtrHashMap<std::string, InterfaceInfo> 83 typedef base::ScopedPtrHashMap<std::string, scoped_ptr<InterfaceInfo>>
84 NameToInterfaceInfoMap; 84 NameToInterfaceInfoMap;
85 85
86 void AddProxy(ApiID id, InterfaceProxy::Factory factory); 86 void AddProxy(ApiID id, InterfaceProxy::Factory factory);
87 87
88 // Permissions is the type of permission required to access the corresponding 88 // Permissions is the type of permission required to access the corresponding
89 // interface. Currently this must be just one unique permission (rather than 89 // interface. Currently this must be just one unique permission (rather than
90 // a bitfield). 90 // a bitfield).
91 void AddPPB(const char* name, const void* iface, Permission permission); 91 void AddPPB(const char* name, const void* iface, Permission permission);
92 void AddPPP(const char* name, const void* iface); 92 void AddPPP(const char* name, const void* iface);
93 93
94 // Hash the interface name for UMA logging. 94 // Hash the interface name for UMA logging.
95 static int HashInterfaceName(const std::string& name); 95 static int HashInterfaceName(const std::string& name);
96 96
97 PpapiPermissions permissions_; 97 PpapiPermissions permissions_;
98 98
99 NameToInterfaceInfoMap name_to_browser_info_; 99 NameToInterfaceInfoMap name_to_browser_info_;
100 NameToInterfaceInfoMap name_to_plugin_info_; 100 NameToInterfaceInfoMap name_to_plugin_info_;
101 101
102 InterfaceProxy::Factory id_to_factory_[API_ID_COUNT]; 102 InterfaceProxy::Factory id_to_factory_[API_ID_COUNT];
103 103
104 DISALLOW_COPY_AND_ASSIGN(InterfaceList); 104 DISALLOW_COPY_AND_ASSIGN(InterfaceList);
105 }; 105 };
106 106
107 } // namespace proxy 107 } // namespace proxy
108 } // namespace ppapi 108 } // namespace ppapi
109 109
110 #endif // PPAPI_PROXY_INTERFACE_LIST_H_ 110 #endif // PPAPI_PROXY_INTERFACE_LIST_H_
111 111
OLDNEW
« no previous file with comments | « media/cdm/aes_decryptor.h ('k') | ppapi/proxy/plugin_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698