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

Side by Side Diff: components/nacl/renderer/ppb_nacl_private_impl.cc

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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/nacl/renderer/ppb_nacl_private_impl.h" 5 #include "components/nacl/renderer/ppb_nacl_private_impl.h"
6 6
7 #include <numeric> 7 #include <numeric>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 NexeLoadManager nexe_load_manager; 122 NexeLoadManager nexe_load_manager;
123 scoped_ptr<JsonManifest> json_manifest; 123 scoped_ptr<JsonManifest> json_manifest;
124 scoped_ptr<InstanceInfo> instance_info; 124 scoped_ptr<InstanceInfo> instance_info;
125 125
126 // When translation is complete, this records the size of the pexe in 126 // When translation is complete, this records the size of the pexe in
127 // bytes so that it can be reported in a later load event. 127 // bytes so that it can be reported in a later load event.
128 uint64_t pexe_size; 128 uint64_t pexe_size;
129 }; 129 };
130 130
131 typedef base::ScopedPtrHashMap<PP_Instance, NaClPluginInstance> InstanceMap; 131 typedef base::ScopedPtrHashMap<PP_Instance, scoped_ptr<NaClPluginInstance>>
132 InstanceMap;
132 base::LazyInstance<InstanceMap> g_instance_map = LAZY_INSTANCE_INITIALIZER; 133 base::LazyInstance<InstanceMap> g_instance_map = LAZY_INSTANCE_INITIALIZER;
133 134
134 NaClPluginInstance* GetNaClPluginInstance(PP_Instance instance) { 135 NaClPluginInstance* GetNaClPluginInstance(PP_Instance instance) {
135 InstanceMap& map = g_instance_map.Get(); 136 InstanceMap& map = g_instance_map.Get();
136 InstanceMap::iterator iter = map.find(instance); 137 InstanceMap::iterator iter = map.find(instance);
137 if (iter == map.end()) 138 if (iter == map.end())
138 return NULL; 139 return NULL;
139 return iter->second; 140 return iter->second;
140 } 141 }
141 142
(...skipping 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 &StreamPexe 1708 &StreamPexe
1708 }; 1709 };
1709 1710
1710 } // namespace 1711 } // namespace
1711 1712
1712 const PPB_NaCl_Private* GetNaClPrivateInterface() { 1713 const PPB_NaCl_Private* GetNaClPrivateInterface() {
1713 return &nacl_interface; 1714 return &nacl_interface;
1714 } 1715 }
1715 1716
1716 } // namespace nacl 1717 } // namespace nacl
OLDNEW
« no previous file with comments | « components/html_viewer/mock_web_blob_registry_impl.h ('k') | components/password_manager/core/browser/affiliation_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698